Compare commits
No commits in common. "df007524edf84b0760faef5bb8233660da4672c6" and "5720767af3d979488ec7317aae2b725f4d3b1d66" have entirely different histories.
df007524ed
...
5720767af3
@ -1,3 +1,22 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS "trailer" (
|
||||||
|
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"name" text NOT NULL UNIQUE
|
||||||
|
);
|
||||||
|
INSERT INTO trailer(name) VALUES('Großer Hänger');
|
||||||
|
INSERT INTO trailer(name) VALUES('Kleiner Hänger');
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS "trailer_reservation" (
|
||||||
|
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"trailer_id" INTEGER NOT NULL REFERENCES boat(id),
|
||||||
|
"start_date" DATE NOT NULL,
|
||||||
|
"end_date" DATE NOT NULL,
|
||||||
|
"time_desc" TEXT NOT NULL,
|
||||||
|
"usage" TEXT NOT NULL,
|
||||||
|
"user_id_applicant" INTEGER NOT NULL REFERENCES user(id),
|
||||||
|
"user_id_confirmation" INTEGER REFERENCES user(id),
|
||||||
|
"created_at" datetime not null default CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
|
|
||||||
-- test user
|
-- test user
|
||||||
INSERT INTO user(name) VALUES('Marie');
|
INSERT INTO user(name) VALUES('Marie');
|
||||||
INSERT INTO "user_role" (user_id, role_id) VALUES((SELECT id from user where name = 'Marie'),(SELECT id FROM role where name = 'Donau Linz'));
|
INSERT INTO "user_role" (user_id, role_id) VALUES((SELECT id from user where name = 'Marie'),(SELECT id FROM role where name = 'Donau Linz'));
|
||||||
|
Loading…
Reference in New Issue
Block a user