Initial commit - Sitemap Builder app

This commit is contained in:
Karol Głowacki
2026-01-09 18:52:15 +01:00
parent 4e5625f03e
commit 318dcc88ac
54 changed files with 7969 additions and 103 deletions

View File

@@ -0,0 +1,58 @@
-- CreateTable
CREATE TABLE "Project" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"thumbnail" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL
);
-- CreateTable
CREATE TABLE "Node" (
"id" TEXT NOT NULL PRIMARY KEY,
"projectId" TEXT NOT NULL,
"type" TEXT NOT NULL DEFAULT 'page',
"title" TEXT NOT NULL DEFAULT 'Nowa strona',
"content" TEXT,
"notes" TEXT,
"status" TEXT NOT NULL DEFAULT 'draft',
"positionX" REAL NOT NULL DEFAULT 0,
"positionY" REAL NOT NULL DEFAULT 0,
"width" REAL,
"height" REAL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "Node_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Edge" (
"id" TEXT NOT NULL PRIMARY KEY,
"projectId" TEXT NOT NULL,
"sourceId" TEXT NOT NULL,
"targetId" TEXT NOT NULL,
"type" TEXT NOT NULL DEFAULT 'default',
CONSTRAINT "Edge_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Attachment" (
"id" TEXT NOT NULL PRIMARY KEY,
"nodeId" TEXT NOT NULL,
"filename" TEXT NOT NULL,
"originalName" TEXT NOT NULL,
"mimeType" TEXT NOT NULL,
"size" INTEGER NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "Attachment_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "Node" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Link" (
"id" TEXT NOT NULL PRIMARY KEY,
"nodeId" TEXT NOT NULL,
"url" TEXT NOT NULL,
"label" TEXT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "Link_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "Node" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);

View File

@@ -0,0 +1,6 @@
-- AlterTable
ALTER TABLE "Project" ADD COLUMN "colorPalette" TEXT;
ALTER TABLE "Project" ADD COLUMN "designNotes" TEXT;
ALTER TABLE "Project" ADD COLUMN "fontPrimary" TEXT;
ALTER TABLE "Project" ADD COLUMN "fontSecondary" TEXT;
ALTER TABLE "Project" ADD COLUMN "globalNotes" TEXT;

View File

@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "sqlite"