I'm learning how to upgrade databases in an flutter application, apears to be very simple, but I'm getting this error executing an INSERT:
E/SQLiteLog( 9107): (1) table tempsettings has no column named user I/flutter ( 9107): DatabaseException(table tempsettings has no column named user (code 1 SQLITE_ERROR): , while compiling: INSERT INTO tempsettings('id', 'user', 'company', 'url') SELECT 'id', 'user', 'company', 'url' FROM settings) E/SQLiteLog( 9107): (1) no such column: user I/flutter ( 9107): DatabaseException(no such column: user (code 1 SQLITE_ERROR): , while compiling: INSERT INTO settings('id', 'user', 'company', 'url', 'theme') SELECT id, user, company, url, 1 FROM tempsettings)
await db
.execute("CREATE TABLE tempsettings("
"'id' INTEGER "
"'user' TEXT,"
"'company' TEXT,"
"'url' TEXT)")
.catchError((error) => print(error.toString()));
await db.execute(
"INSERT INTO tempsettings('id', 'user', 'company', 'url') SELECT 'id', 'user', 'company', 'url' FROM settings")
.catchError((error) => print(error.toString()));
Does anyone could help me how to do this INSERT?
Thanks.