androiddatabasekotlinsqliteandroid-jetpack-compose

How to add new table to existing database in kotlin


i need to add a new table to a existing database in kotlin. when i try to add it in the app inspection, database inspection shows the database is closed.enter image description here

here is my code

enter image description here enter image description here


Solution

  • as I see in your code I did not see any migration code maybe this caused this issue. write migration and maybe it's work.