drift icon indicating copy to clipboard operation
drift copied to clipboard

Error insert data to table in specific device.

Open gnusagit opened this issue 3 years ago • 1 comments

I have error when inserting some data to table: [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: DatabaseException(no such table: options (code 1 SQLITE_ERROR): , while compiling: INSERT INTO options (id, id_polling, option, is_selected) VALUES (?, ?, ?, ?)) sql 'INSERT INTO options (id, id_polling, option, is_selected) VALUES (?, ?, ?, ?)' args [4JO4J, nPKV4, fdd, 0]

using two device tester with spec: 1. device one:

  • POCO M3 PRO
  • Android version : 11 RP1A.200720.011
  • MIUI Version : 12.5.4.0(RKSIDXM)
  • Model : M2103K19PG (in this device the error not appear)

2. device two:

  • Xiaomi 11t pro
  • Android version : 11
  • MIUI Version : 12.5 (in this device the error appear like above)

gnusagit avatar Jul 27 '22 09:07 gnusagit

Does this happen consistently on these devices (so, even if you clear you app's data in the system setting and launch it again)?

My guess is that you've perhaps added the options table later without writing schema migrations? If you have installed the app on the poco m3 after adding the options table, it will be there. If you have installed the app on the Xiaomi before adding the options table, it will be missing if you didn't write a schema migration.

simolus3 avatar Jul 27 '22 20:07 simolus3