⬆️ v3.0.0 (#704)

This commit is contained in:
Luke Vella 2023-06-19 17:17:00 +01:00 committed by GitHub
parent 735056f25f
commit c22b3abc4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
385 changed files with 19912 additions and 5250 deletions

View file

@ -0,0 +1,39 @@
-- CreateEnum
CREATE TYPE "time_format" AS ENUM ('hours12', 'hours24');
-- AlterTable
ALTER TABLE "polls" ADD COLUMN "event_id" TEXT,
ADD COLUMN "selected_option_id" TEXT;
-- CreateTable
CREATE TABLE "user_preferences" (
"user_id" TEXT NOT NULL,
"time_zone" TEXT,
"week_start" INTEGER,
"time_format" "time_format",
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "user_preferences_pkey" PRIMARY KEY ("user_id")
);
-- CreateTable
CREATE TABLE "events" (
"id" TEXT NOT NULL,
"poll_id" TEXT NOT NULL,
"user_id" TEXT NOT NULL,
"title" TEXT NOT NULL,
"start" TIMESTAMP(0) NOT NULL,
"duration_minutes" INTEGER NOT NULL DEFAULT 0,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "events_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "events_poll_id_key" ON "events"("poll_id");
-- CreateIndex
CREATE INDEX "events_poll_id_idx" ON "events" USING HASH ("poll_id");
-- CreateIndex
CREATE INDEX "events_user_id_idx" ON "events" USING HASH ("user_id");

View file

@ -0,0 +1,8 @@
/*
Warnings:
- Added the required column `option_id` to the `events` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "events" ADD COLUMN "option_id" TEXT NOT NULL;

View file

@ -0,0 +1,8 @@
/*
Warnings:
- You are about to drop the column `selected_option_id` on the `polls` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "polls" DROP COLUMN "selected_option_id";