Files
Momento/memento-note/prisma/migrations/20260524110000_add_live_block_ref/migration.sql
Antigravity e2672cd2c2
Some checks failed
CI / Lint, Test & Build (push) Failing after 1m19s
CI / Deploy production (on server) (push) Has been skipped
feat(notes): liens internes, onglet Réseau, living blocks et consentement IA
Rend les liens entre notes visibles et persistants (sync NoteLink au save, auto-save, graphe réseau rafraîchi), ajoute living blocks, Memory Echo, recherche globale, consentement IA explicite et consolide les prototypes design en architectural-grid.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-24 14:27:29 +00:00

23 lines
866 B
SQL

-- CreateTable
CREATE TABLE "LiveBlockRef" (
"id" TEXT NOT NULL,
"sourceNoteId" TEXT NOT NULL,
"blockId" TEXT NOT NULL,
"targetNoteId" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "LiveBlockRef_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE INDEX "LiveBlockRef_sourceNoteId_blockId_idx" ON "LiveBlockRef"("sourceNoteId", "blockId");
-- CreateIndex
CREATE INDEX "LiveBlockRef_targetNoteId_idx" ON "LiveBlockRef"("targetNoteId");
-- AddForeignKey
ALTER TABLE "LiveBlockRef" ADD CONSTRAINT "LiveBlockRef_sourceNoteId_fkey" FOREIGN KEY ("sourceNoteId") REFERENCES "Note"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "LiveBlockRef" ADD CONSTRAINT "LiveBlockRef_targetNoteId_fkey" FOREIGN KEY ("targetNoteId") REFERENCES "Note"("id") ON DELETE CASCADE ON UPDATE CASCADE;