Open spurdow opened 3 years ago
hello @spurdow. what do you mean by "pulling sql files"?
Hello @MatrixDev - Btw - firstly thanks. This library greatly helps us.
I mean instead migrating by adding migration codes, Is it possible to store .sql files in asset/ or any configurable folder in AS and then the lib will automatically pull that depending on the db schema version like 1.sql , 2.sql so on and so forth.
Similar to the then ActiveAndroid https://github.com/pardom-zz/ActiveAndroid which is amazing. Thanks
@spurdow, glad you've liked this library. So from what I understood those *.sql files will just contain plain SQL commands to alter database.
For example instead of writing:
@FieldMigrationRule(version1 = 3, version2 = 4, table = "Object1Dbo", field = "intValRenamed")
fun migrate_3_4_Object1Dbo_intVal(): String {
return "`Object1Dbo`.`intVal`"
}
You'll have 3-4.sql
file containing SQL script to execute?
ALTER TABLE Items ADD COLUMN color INTEGER;
@MatrixDev Yes - or 4.sql will do I guess?
Hello @MatrixDev -
Would it be possible to have a support to pull .sql files to use as migration?
Thanks