Open ourweb4 opened 3 weeks ago
Well, how did you create the database then? Can you show some related snippets?
Some likely causes are:
words
table after running the app with the initial database once, and didn't write a migration to upgrade the database and add the table.But I'm going to need more information to provide meaningful help here.
Hi, I keep on getting exact same error SqliteException(1): while preparing statement, no such table ... even when i see table created in .g file. I wiped my emulator data and still not use. Table exist after i run runner but no idea why i cannot use it. I tested on ios, android emulators as well as macos. Same error. I even tried to rename tables. This happens after i create new tables. I created a table before which is still working but any new separate tables created have below error, even when i see the name in .g database file. Also, primary key is assigned by me and not auto incremented key and am using companions.
Package version: drift: ^2.18.0
Causing statement: SELECT * FROM
Error executing query: SqliteException(1): while preparing statement, no such table
QL logic error (code 1)
SqliteException(1): while preparing statement, no such table:
Causing statement: SELECT * FROM "
Example Table
TextColumn get contactUniqueIdentifier =>
text().customConstraint('NOT NULL UNIQUE')(); // Non-nullable and unique
TextColumn get name => text()
.withDefault(const Constant(''))(); // Nullable with default empty string
TextColumn get type => text()
.withDefault(const Constant(''))(); // Nullable with default empty string
// Empty fields for future use
TextColumn get emptyField1 => text()
.withDefault(const Constant(''))(); // Nullable with default empty string
TextColumn get emptyField2 => text()
.withDefault(const Constant(''))(); // Nullable with default empty string
TextColumn get emptyField3 => text()
.withDefault(const Constant(''))(); // Nullable with default empty string
@override
Set<Column> get primaryKey => {uniqueIdentifier}; // Primary key
Hi, Is there another package I can use for database other than drift? That will work please
HI, I'm trying to write a database but it keeps giving me the above error.I think I created the database right way to my knowledge. Thanks