How to create multiple tables in a database in sqflite?

后端 未结 6 1894
礼貌的吻别
礼貌的吻别 2021-01-11 11:51

Im building and app with flutter that uses SQLite database. I have created first table using this piece of code:

 void _createDb(Database db, int newVersion)         


        
6条回答
  •  心在旅途
    2021-01-11 12:20

    Change the name of the DB file. This will 'reset' your DB and creation will work.

    e.g:

    final dabasesPath = await getDatabasesPath(); 
    final path = join(dabasesPath, "newName2.db");
    

提交回复
热议问题