Initial commit

This commit is contained in:
2020-07-23 11:45:59 +02:00
commit d303232201
22 changed files with 1649 additions and 0 deletions
View File
@@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
Drop TABLE stunden;
@@ -0,0 +1,7 @@
-- Your SQL goes here
CREATE TABLE stunden (
id Integer PRIMARY KEY NOT NULL,
title Text NOT NULL,
short Text NOT NULL,
ordinal Integer NOT NULL
);
@@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
Drop TABLE Klassen;
@@ -0,0 +1,8 @@
-- Your SQL goes here
CREATE TABLE klassen (
id Integer PRIMARY KEY NOT NULL,
stufe Integer not null,
gruppe Text NOT NULL,
titel Text,
ordinal Integer NOT NULL
);
@@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
Alter Table klassen Rename Column ordnung to ordinal;
@@ -0,0 +1,2 @@
-- Your SQL goes here
Alter Table klassen Rename Column ordinal to ordnung;
@@ -0,0 +1 @@
-- This file should undo anything in `up.sql`
@@ -0,0 +1,11 @@
-- Your SQL
CREATE TABLE Vertretungen (
id Integer PRIMARY KEY NOT NULL,
klasse Integer not null,
stunde Integer not null,
fehlend Text NOT NULL,
vertretung Text NOT NULL,
kommentar Text NOT NULL,
FOREIGN KEY(klasse) REFERENCES klasse(id),
FOREIGN KEY(stunde) REFERENCES stunde(id)
);