noteshare.space/server/prisma/migrations/20220825142403_add_embed_table/migration.sql

11 lines
378 B
MySQL
Raw Normal View History

2022-08-25 17:24:18 +03:00
-- CreateTable
CREATE TABLE "EncryptedEmbed" (
"id" TEXT NOT NULL PRIMARY KEY,
"note_id" TEXT NOT NULL,
"embed_id" TEXT NOT NULL,
"ciphertext" BLOB NOT NULL,
"hmac" TEXT NOT NULL,
"size_bytes" INTEGER NOT NULL,
CONSTRAINT "EncryptedEmbed_note_id_fkey" FOREIGN KEY ("note_id") REFERENCES "EncryptedNote" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);