mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-19 20:06:19 +02:00
⬆️ v3.0.0 (#704)
This commit is contained in:
parent
735056f25f
commit
c22b3abc4d
385 changed files with 19912 additions and 5250 deletions
|
@ -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");
|
|
@ -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;
|
|
@ -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";
|
Loading…
Add table
Add a link
Reference in a new issue