You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I chose to delete my duplicated database files and only use 1.db now when I execute verifySqlDelightMigration and it fails:
> There was a failure while executing work items
> A failure occurred while executing app.cash.sqldelight.gradle.VerifyMigrationTask$VerifyMigrationAction
> Error migrating from 1.db, fresh database looks different from migration database:
/tables[flashCategory]/foreignKeys[]/foreignKeyTable/definition - CHANGED
BEFORE:
CREATE TABLE flashDeck (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
color INTEGER NOT NULL,
created INTEGER NOT NULL,
updated INTEGER NOT NULL,
category TEXT,
dailyReminder INTEGER NOT NULL DEFAULT 1,
FOREIGN KEY (category) REFERENCES flashCategory(id)
)
AFTER:
CREATE TABLE flashDeck (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
color INTEGER NOT NULL,
created INTEGER NOT NULL,
updated INTEGER NOT NULL
, category TEXT REFERENCES flashCategory(id), dailyReminder INTEGER NOT NULL DEFAULT 1)
/tables[flashDeck]/definition - CHANGED
BEFORE:
CREATE TABLE flashDeck (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
color INTEGER NOT NULL,
created INTEGER NOT NULL,
updated INTEGER NOT NULL,
category TEXT,
dailyReminder INTEGER NOT NULL DEFAULT 1,
FOREIGN KEY (category) REFERENCES flashCategory(id)
)
AFTER:
CREATE TABLE flashDeck (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
color INTEGER NOT NULL,
created INTEGER NOT NULL,
updated INTEGER NOT NULL
, category TEXT REFERENCES flashCategory(id), dailyReminder INTEGER NOT NULL DEFAULT 1)
/tables[flashCard]/foreignKeys[]/primaryKeyTable/definition - CHANGED
BEFORE:
CREATE TABLE flashDeck (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
color INTEGER NOT NULL,
created INTEGER NOT NULL,
updated INTEGER NOT NULL,
category TEXT,
dailyReminder INTEGER NOT NULL DEFAULT 1,
FOREIGN KEY (category) REFERENCES flashCategory(id)
)
AFTER:
CREATE TABLE flashDeck (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
color INTEGER NOT NULL,
created INTEGER NOT NULL,
updated INTEGER NOT NULL
, category TEXT REFERENCES flashCategory(id), dailyReminder INTEGER NOT NULL DEFAULT 1)
/tables[flashCard]/tableConstraints[]/primaryKeyTable/definition - CHANGED
BEFORE:
CREATE TABLE flashDeck (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
color INTEGER NOT NULL,
created INTEGER NOT NULL,
updated INTEGER NOT NULL,
category TEXT,
dailyReminder INTEGER NOT NULL DEFAULT 1,
FOREIGN KEY (category) REFERENCES flashCategory(id)
)
AFTER:
CREATE TABLE flashDeck (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
color INTEGER NOT NULL,
created INTEGER NOT NULL,
updated INTEGER NOT NULL
, category TEXT REFERENCES flashCategory(id), dailyReminder INTEGER NOT NULL DEFAULT 1)
I've tried reproducing in a sample project but I just can't. I've also stopped Gradle and did everything cleanly, still same result.
However looking at the text input while they aren't the same, unless I'm missing something, they seem to be correct and the same.
It's just that the definition for the foreign key is textually different:
-category TEXT,-FOREIGN KEY (category) REFERENCES flashCategory(id)+category TEXT REFERENCES flashCategory(id)
I also don't know why this exact text output is listed 4 times:
if you update your .sq version of the schema to match the BEFORE does it work fine? I don't think we'll actually be able to fix this since we're doing string matching instead of anything more intense.
Alternatively, since this check is new we can provide an option to turn off definition matching so it preserves the old behaviour.
SQLDelight Version
2.0.0-alpha02
Operating System
Mac
Gradle Version
7.4.2
Kotlin Version
1.6.20
AGP Version
7.1.3
Describe the Bug
I chose to delete my duplicated database files and only use
1.db
now when I executeverifySqlDelightMigration
and it fails:I've tried reproducing in a sample project but I just can't. I've also stopped Gradle and did everything cleanly, still same result.
However looking at the text input while they aren't the same, unless I'm missing something, they seem to be correct and the same.
It's just that the definition for the foreign key is textually different:
I also don't know why this exact text output is listed 4 times:
String replacing also seems to fail in the after text:
Stacktrace
No response
Gradle Build Script
No response
The text was updated successfully, but these errors were encountered: