Add style and prepare relationships
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
-- Your SQL goes here
|
||||
CREATE TABLE stunden (
|
||||
CREATE TABLE stunden
|
||||
(
|
||||
id Integer PRIMARY KEY NOT NULL,
|
||||
title Text NOT NULL,
|
||||
short Text NOT NULL,
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
-- 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
|
||||
|
||||
CREATE TABLE klassen
|
||||
(
|
||||
id Integer PRIMARY KEY NOT NULL,
|
||||
stufe Integer NOT NULL,
|
||||
gruppe Text NOT NULL,
|
||||
titel Text,
|
||||
ordinal Integer NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
Alter Table klassen Rename Column ordnung to ordinal;
|
||||
|
||||
ALTER TABLE klassen RENAME COLUMN ordnung TO ordinal;
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
-- Your SQL goes here
|
||||
Alter Table klassen Rename Column ordinal to ordnung;
|
||||
|
||||
ALTER TABLE klassen RENAME COLUMN ordinal TO ordnung;
|
||||
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
-- This file should undo anything in `up.sql`
|
||||
|
||||
DROP TABLE Vertretungen;
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
-- 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)
|
||||
|
||||
CREATE TABLE Vertretungen
|
||||
(
|
||||
id Integer PRIMARY KEY NOT NULL,
|
||||
klassen_id Integer NOT NULL,
|
||||
stunden_id Integer NOT NULL,
|
||||
fehlend Text NOT NULL,
|
||||
vertretung Text NOT NULL,
|
||||
kommentar Text NOT NULL,
|
||||
FOREIGN KEY(klasse_id) REFERENCES klasse(id),
|
||||
FOREIGN KEY(stunde_id) REFERENCES stunde(id)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user