diff options
author | Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> | 2021-02-08 21:27:53 +0100 |
---|---|---|
committer | Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> | 2021-02-08 21:27:53 +0100 |
commit | d0e2a39f694324815e263f0587e6827f7ef26f09 (patch) | |
tree | f0919ef1102e2acf84eea8d7eea00b8d7928e6d7 /db_creation | |
parent | d0458229daf205f2da50f40fa0ea59b20be5513e (diff) | |
download | justice-d0e2a39f694324815e263f0587e6827f7ef26f09.tar.gz |
clean up changes
Diffstat (limited to 'db_creation')
-rw-r--r-- | db_creation | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/db_creation b/db_creation index f2976b4..9fc44e0 100644 --- a/db_creation +++ b/db_creation @@ -64,3 +64,34 @@ CREATE TABLE "ulice_relation" ( FOREIGN KEY("company_id") REFERENCES "companies"("id"), FOREIGN KEY("ulice_id") REFERENCES "ulice"("id") ) + +CREATE TABLE "predmety_cinnosti_relation" ( + "company_id" INTEGER NOT NULL, + "predmet_cinnosti_id" INTEGER NOT NULL, + "zapis_datum" DATE, + "vymaz_datum" DATE, + FOREIGN KEY("company_id") REFERENCES "companies"("id"), + FOREIGN KEY("predmet_cinnosti_id") REFERENCES "predmety_cinnosti"("id") +) + +CREATE TABLE "predmety_podnikani_relation" ( + "company_id" INTEGER NOT NULL, + "predmet_podnikani_id" INTEGER NOT NULL, + "zapis_datum" DATE, + "vymaz_datum" DATE, + FOREIGN KEY("company_id") REFERENCES "companies"("id"), + FOREIGN KEY("predmet_podnikani_id") REFERENCES "predmety_podnikani"("id") +) + +CREATE TABLE "predmety_cinnosti" ( + "id" INTEGER NOT NULL, + "predmet_cinnosti" TEXT NOT NULL UNIQUE, + PRIMARY KEY("id" AUTOINCREMENT) +) + +CREATE TABLE "predmety_podnikani" ( + "id" INTEGER NOT NULL, + "predmet_podnikani" TEXT NOT NULL UNIQUE, + PRIMARY KEY("id" AUTOINCREMENT) +) + |