admin管理员组

文章数量:1401176

In my android project I have two module say Module1 and Module2 and both have separate DB say DB1 and DB2, Now due to cross functionality in module I have to merge both module and so now only one DB is required, But this project is already live now how to manage DB migration while merging both DB into one.

In my android project I have two module say Module1 and Module2 and both have separate DB say DB1 and DB2, Now due to cross functionality in module I have to merge both module and so now only one DB is required, But this project is already live now how to manage DB migration while merging both DB into one.

Share Improve this question asked Mar 24 at 4:50 gourav anandgourav anand 232 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 0

1. create all 'DB2's tables in DB1.

2. Make one function (on the opening activity) to copy data from the DB2's tables into DB1 (which data you required to continue)

3. make sure this function should run one time only.

4. By the ext versions, ignore the DB2. And later on (after a while) you can remove the DB2.

本文标签: databaseRoom DB migration in Android KotlinStack Overflow