add migration

This commit is contained in:
philipp 2023-04-28 21:18:50 +02:00
parent 253018580a
commit ea72b06c18

View File

@ -13,7 +13,9 @@ CREATE TABLE IF NOT EXISTS "trip_details" (
"planned_starting_time" text NOT NULL, "planned_starting_time" text NOT NULL,
"max_people" INTEGER NOT NULL, "max_people" INTEGER NOT NULL,
"day" TEXT NOT NULL, "day" TEXT NOT NULL,
"notes" TEXT "notes" TEXT,
"trip_type_id" INTEGER,
FOREIGN KEY(trip_type_id) REFERENCES trip_type(id)
); );
CREATE TABLE IF NOT EXISTS "planned_event" ( CREATE TABLE IF NOT EXISTS "planned_event" (
@ -52,3 +54,11 @@ CREATE TABLE IF NOT EXISTS "log" (
"msg" text NOT NULL, "msg" text NOT NULL,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP "created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP
); );
CREATE TABLE IF NOT EXISTS "trip_type" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" text NOT NULL UNIQUE,
"desc" text NOT NULL,
"question" text NOT NULL,
"icon" text NOT NULL
);