guest book added

This commit is contained in:
2025-06-26 12:37:34 -04:00
parent 6aceafeb67
commit 29c91fee7f
17 changed files with 622 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
-- CreateTable
CREATE TABLE "GuestBookEntry" (
"id" TEXT NOT NULL,
"ownerId" TEXT NOT NULL,
"name" TEXT NOT NULL,
"email" TEXT,
"phone" TEXT,
"address" TEXT,
"notes" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "GuestBookEntry_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "GuestBookEntry" ADD CONSTRAINT "GuestBookEntry_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@@ -0,0 +1,13 @@
/*
Warnings:
- You are about to drop the column `ownerId` on the `GuestBookEntry` table. All the data in the column will be lost.
- Added the required column `side` to the `GuestBookEntry` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE "GuestBookEntry" DROP CONSTRAINT "GuestBookEntry_ownerId_fkey";
-- AlterTable
ALTER TABLE "GuestBookEntry" DROP COLUMN "ownerId",
ADD COLUMN "side" TEXT NOT NULL;

View File

@@ -0,0 +1,12 @@
/*
Warnings:
- You are about to drop the column `name` on the `GuestBookEntry` table. All the data in the column will be lost.
- Added the required column `fName` to the `GuestBookEntry` table without a default value. This is not possible if the table is not empty.
- Added the required column `lName` to the `GuestBookEntry` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "GuestBookEntry" DROP COLUMN "name",
ADD COLUMN "fName" TEXT NOT NULL,
ADD COLUMN "lName" TEXT NOT NULL;