-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PRIMARY KEY without AUTOINCREMENT #39
Comments
Keep in mind that SQLite supports a limited subset of the ALTER TABLE command and column modification is not supported. If we had a I feel like it makes more sense to modify the |
Hi @VincentFTS, If you move an If you really need to create the initial table differently, you can just use your own SQLiteOpenHelper. public class MyContentProvider extends ProviGenProvider {
@Override
public Class[] contractClasses() {
return new Class[]{MyContract.class};
}
@Override
public SQLiteOpenHelper openHelper(Context context) {
return new SQLiteOpenHelper(getContext(), "databaseName", null, 1) {
@Override
public void onCreate(SQLiteDatabase database) {
// Create the table without the AUTOINCREMENT here.
}
};
}
} Another option would be to fork ProviGen and modify the |
@VincentFTS Did you find a solution to your problem ? |
Hi,
I need a database table whose primary key will be a UUID saved in a STRING.
The TableBuilder adds automatically the AUTOINCREMENT keyword while it is only allowed on an INTEGER PRIMARY KEY.
An annotation parameter may be added to the "@id" annotation to make the PRIMARY KEY automatically generated or not.
The text was updated successfully, but these errors were encountered: