-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src-tauri/prisma/migrations/20230725155311_analyse_file/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
Warnings: | ||
- Added the required column `bpm` to the `File` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `chordsKey` to the `File` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `chordsScale` to the `File` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `danceability` to the `File` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- RedefineTables | ||
PRAGMA foreign_keys=OFF; | ||
CREATE TABLE "new_File" ( | ||
"path" TEXT NOT NULL PRIMARY KEY, | ||
"name" TEXT NOT NULL, | ||
"directoryPath" TEXT NOT NULL, | ||
"bpm" REAL NOT NULL, | ||
"danceability" REAL NOT NULL, | ||
"chordsKey" TEXT NOT NULL, | ||
"chordsScale" TEXT NOT NULL, | ||
CONSTRAINT "File_directoryPath_fkey" FOREIGN KEY ("directoryPath") REFERENCES "Directory" ("path") ON DELETE RESTRICT ON UPDATE CASCADE | ||
); | ||
INSERT INTO "new_File" ("directoryPath", "name", "path") SELECT "directoryPath", "name", "path" FROM "File"; | ||
DROP TABLE "File"; | ||
ALTER TABLE "new_File" RENAME TO "File"; | ||
PRAGMA foreign_key_check; | ||
PRAGMA foreign_keys=ON; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters