guest book added
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user