Update on Songbooksongs number
Number of Song in a Songbook is not number anymore but string so "3a" would work.
This commit is contained in:
1 parent
b060ab29cf
commit
496a70ffed
2 files changed
+18
-1
No files matched your search
@@ -0,0 +1,17 @@
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_SongBookSongs" (
|
||||
"songBookId" INTEGER NOT NULL,
|
||||
"songId" INTEGER NOT NULL,
|
||||
"songNumber" TEXT NOT NULL,
|
||||
|
||||
PRIMARY KEY ("songBookId", "songId"),
|
||||
CONSTRAINT "SongBookSongs_songId_fkey" FOREIGN KEY ("songId") REFERENCES "Song" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT "SongBookSongs_songBookId_fkey" FOREIGN KEY ("songBookId") REFERENCES "SongBook" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_SongBookSongs" ("songBookId", "songId", "songNumber") SELECT "songBookId", "songId", "songNumber" FROM "SongBookSongs";
|
||||
DROP TABLE "SongBookSongs";
|
||||
ALTER TABLE "new_SongBookSongs" RENAME TO "SongBookSongs";
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
||||
Reference in new issue
Block a user