Add art types and categories
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[name]` on the table `PortfolioCategory` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[name]` on the table `PortfolioTag` will be added. If there are existing duplicate values, this will fail.
|
||||
- Made the column `name` on table `PortfolioCategory` required. This step will fail if there are existing NULL values in that column.
|
||||
- Made the column `name` on table `PortfolioTag` required. This step will fail if there are existing NULL values in that column.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "PortfolioCategory" ADD COLUMN "description" TEXT,
|
||||
ALTER COLUMN "name" SET NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "PortfolioTag" ADD COLUMN "description" TEXT,
|
||||
ALTER COLUMN "name" SET NOT NULL;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "PortfolioCategory_name_key" ON "PortfolioCategory"("name");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "PortfolioTag_name_key" ON "PortfolioTag"("name");
|
@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "PortfolioImage" ADD COLUMN "setAsHeader" BOOLEAN NOT NULL DEFAULT false;
|
@ -0,0 +1,9 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "PortfolioImage" ADD COLUMN "artType" TEXT,
|
||||
ADD COLUMN "group" TEXT,
|
||||
ADD COLUMN "kind" TEXT,
|
||||
ADD COLUMN "layoutGroup" TEXT,
|
||||
ADD COLUMN "layoutOrder" INTEGER,
|
||||
ADD COLUMN "month" INTEGER,
|
||||
ADD COLUMN "series" TEXT,
|
||||
ADD COLUMN "year" INTEGER;
|
@ -0,0 +1,28 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `artType` on the `PortfolioImage` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "PortfolioImage" DROP COLUMN "artType",
|
||||
ADD COLUMN "artTypeId" TEXT;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "PortfolioArtType" (
|
||||
"id" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
"sortIndex" INTEGER NOT NULL DEFAULT 0,
|
||||
"name" TEXT NOT NULL,
|
||||
"slug" TEXT,
|
||||
"description" TEXT,
|
||||
|
||||
CONSTRAINT "PortfolioArtType_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "PortfolioArtType_name_key" ON "PortfolioArtType"("name");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "PortfolioImage" ADD CONSTRAINT "PortfolioImage_artTypeId_fkey" FOREIGN KEY ("artTypeId") REFERENCES "PortfolioArtType"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
Reference in New Issue
Block a user