taktik-nette

This commit is contained in:
2025-01-22 22:52:26 +01:00
commit 8e2cd6ca68
45 changed files with 5410 additions and 0 deletions

21
migrations/001_init.sql Normal file
View File

@@ -0,0 +1,21 @@
CREATE TABLE survey (
id BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255) NOT NULL COLLATE utf8_czech_ci,
comments TEXT COLLATE utf8_czech_ci,
agreement BOOLEAN NOT NULL
);
CREATE INDEX idx_survey_name ON survey (name);
CREATE FULLTEXT INDEX idx_survey_comments ON survey (comments);
CREATE TABLE interests
(
id BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
survey_id BIGINT UNSIGNED NOT NULL,
interest VARCHAR(255) NOT NULL COLLATE utf8_czech_ci ,
FOREIGN KEY (survey_id) REFERENCES survey (id) ON DELETE CASCADE ON UPDATE CASCADE
);
CREATE INDEX idx_interests_survey_id ON interests (survey_id);
CREATE INDEX idx_interests_interest ON interests (interest);