Skip to content
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

Add a version parameter to the @Table annotation #49

Open
LouisCAD opened this issue Mar 24, 2016 · 2 comments
Open

Add a version parameter to the @Table annotation #49

LouisCAD opened this issue Mar 24, 2016 · 2 comments

Comments

@LouisCAD
Copy link

Hi!
Today, I am adding a table to my Database I use with Schematic, and I'm metting SQL hassle again to properly add manually the new table in the @OnUpgrade annotated method. I think a version parameter on @Table annotation, with would default to 0, representing the first version which included the table would be a nice way to tell Schematic to add itself the table in the onUpgrade(...) android framework method, following the table contract which for now is only used to access the ContentProvider and when the database is first created.

@SimonVT
Copy link
Owner

SimonVT commented Mar 25, 2016

I'd like to have a @Version annotation that can be used on fields annotated with @Table, @DataType and @ExecOnCreate.

For now, the full sql used to create the table is exposed in the generated SQLiteOpenHelper. You can use that directly.

@LouisCAD
Copy link
Author

Yep, that's what I used for now, I run the SQL statement field. An @Version annotation would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants