diff --git a/data/sql/schema.sql b/data/sql/schema.sql index fe5fbd2..f5db9ac 100644 --- a/data/sql/schema.sql +++ b/data/sql/schema.sql @@ -3,7 +3,7 @@ CREATE TABLE anlage (id BIGINT AUTO_INCREMENT, longname VARCHAR(255), kuerzel VA CREATE TABLE bild (id BIGINT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, path VARCHAR(255) NOT NULL, caption TEXT, section_id BIGINT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX section_id_idx (section_id), PRIMARY KEY(id)) ENGINE = INNODB; CREATE TABLE section (id BIGINT AUTO_INCREMENT, lnr BIGINT NOT NULL, anlage_id BIGINT, inhalt TEXT, tip TEXT, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, UNIQUE INDEX section_lnr_idx (anlage_id, lnr), INDEX anlage_id_idx (anlage_id), PRIMARY KEY(id)) ENGINE = INNODB; CREATE TABLE stunde (id BIGINT AUTO_INCREMENT, lnr BIGINT NOT NULL, name VARCHAR(255) NOT NULL, zim_id BIGINT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, UNIQUE INDEX zim_lnr_idx (zim_id, lnr), INDEX zim_id_idx (zim_id), PRIMARY KEY(id)) ENGINE = INNODB; -CREATE TABLE zim (id BIGINT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, ptkuerzel VARCHAR(255) NOT NULL, ptjahr VARCHAR(255) NOT NULL, user_id BIGINT, ziele TEXT, zielgruppe VARCHAR(255), roterfaden TEXT, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX user_id_idx (user_id), PRIMARY KEY(id)) ENGINE = INNODB; +CREATE TABLE zim (id BIGINT AUTO_INCREMENT, name VARCHAR(255) NOT NULL, ptkuerzel VARCHAR(255) NOT NULL, ptjahr VARCHAR(255) NOT NULL, user_id INT, ziele TEXT, zielgruppe VARCHAR(255), roterfaden TEXT, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX user_id_idx (user_id), PRIMARY KEY(id)) ENGINE = INNODB; CREATE TABLE sf_guard_group (id INT AUTO_INCREMENT, name VARCHAR(255) UNIQUE, description TEXT, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) ENGINE = INNODB; CREATE TABLE sf_guard_group_permission (group_id INT, permission_id INT, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(group_id, permission_id)) ENGINE = INNODB; CREATE TABLE sf_guard_permission (id INT AUTO_INCREMENT, name VARCHAR(255) UNIQUE, description TEXT, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) ENGINE = INNODB;