wasp/waspc/examples/pg-vector-example/migrations/20230911093209_add_url/migration.sql
2023-09-12 13:03:57 +02:00

16 lines
716 B
SQL

/*
Warnings:
- A unique constraint covering the columns `[url]` on the table `Document` will be added. If there are existing duplicate values, this will fail.
- Added the required column `updatedAt` to the `Document` table without a default value. This is not possible if the table is not empty.
- Added the required column `url` to the `Document` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Document" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL,
ADD COLUMN "url" TEXT NOT NULL;
-- CreateIndex
CREATE UNIQUE INDEX "Document_url_key" ON "Document"("url");