diff options
| author | MohamedBassem <me@mbassem.com> | 2024-02-06 18:16:35 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-02-06 19:24:52 +0000 |
| commit | baf48af5f0a4b88642edc18ae8b16e81260e1846 (patch) | |
| tree | 1f9779ac76b21ba7504ec664f05064d1b4e9ff2a /db/prisma/migrations/20240206192241_add_favicon/migration.sql | |
| parent | e035c2fd1067a06d4774c64ae54548f664490f9d (diff) | |
| download | karakeep-baf48af5f0a4b88642edc18ae8b16e81260e1846.tar.zst | |
Implement metadata fetching logic in the crawler
Diffstat (limited to 'db/prisma/migrations/20240206192241_add_favicon/migration.sql')
| -rw-r--r-- | db/prisma/migrations/20240206192241_add_favicon/migration.sql | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/prisma/migrations/20240206192241_add_favicon/migration.sql b/db/prisma/migrations/20240206192241_add_favicon/migration.sql new file mode 100644 index 00000000..330575e9 --- /dev/null +++ b/db/prisma/migrations/20240206192241_add_favicon/migration.sql @@ -0,0 +1,16 @@ +-- RedefineTables +PRAGMA foreign_keys=OFF; +CREATE TABLE "new_BookmarkedLinkDetails" ( + "id" TEXT NOT NULL PRIMARY KEY, + "title" TEXT, + "description" TEXT, + "imageUrl" TEXT, + "favicon" TEXT, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT "BookmarkedLinkDetails_id_fkey" FOREIGN KEY ("id") REFERENCES "BookmarkedLink" ("id") ON DELETE CASCADE ON UPDATE CASCADE +); +INSERT INTO "new_BookmarkedLinkDetails" ("createdAt", "description", "id", "imageUrl", "title") SELECT "createdAt", "description", "id", "imageUrl", "title" FROM "BookmarkedLinkDetails"; +DROP TABLE "BookmarkedLinkDetails"; +ALTER TABLE "new_BookmarkedLinkDetails" RENAME TO "BookmarkedLinkDetails"; +PRAGMA foreign_key_check; +PRAGMA foreign_keys=ON; |
