Closed andhikayuana closed 6 years ago
sql
write your sql script inside that file :
example :
ALTER TABLE comments ADD COLUMN TESTING TEXT; UPDATE comments SET TESTING = sender_email;
place above file inside assets directory
assets
increase DB version com.qiscus.sdk.data.local.QiscusDb.DATABASE_VERSION
com.qiscus.sdk.data.local.QiscusDb.DATABASE_VERSION
Voila :smile:
bang @zetbaitsu ini udah ada examplenya juga, eh ini examplenya tak ganti ke bikik index ke field aja sekalian :smile:
examplenya
Better local data migration :
sql
script with naming like qiscus.db_from_oldVersion_to_newVersion.sql exmaple : qiscus.db_from_14_to_15.sqlwrite your sql script inside that file :
example :
place above file inside
assets
directoryincrease DB version
com.qiscus.sdk.data.local.QiscusDb.DATABASE_VERSION
Voila :smile:
Test migration