what is the correct way to upgrade sqllite db?

前端 未结 4 1402
予麋鹿
予麋鹿 2021-01-16 16:31
private static final String TABLE_MAIN_CREATE = \"CREATE TABLE IF NOT EXISTS \" + TABLE_MAIN_NAME + \" ( a INTEGER, b LONG, c TEXT, d TEXT, e DATETIME, f TEXT)\";
pr         


        
4条回答
  •  我在风中等你
    2021-01-16 17:18

    In Android Documentation:

    This method is called after the database connection has been configured and after the database schema has been created, upgraded or downgraded as necessary.

    onCreate(db); is not necessary for upgrade your database.

提交回复
热议问题