diff options
author | Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> | 2021-04-04 13:50:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-04 13:50:15 +0200 |
commit | eabfee5453029c58dfc1316e088368a925dd7c1a (patch) | |
tree | c0e0d1dfb229dbb4157a63bd32d4d4a3c73e0647 /db_creation | |
parent | 0fd9e0b55ceb1582549cb49b96d03c671cc4407c (diff) | |
parent | ecc371c16005650d6d623125f407d44b362b7054 (diff) | |
download | justice-eabfee5453029c58dfc1316e088368a925dd7c1a.tar.gz |
Merge pull request #2 from SveterCZE/feature_branchg
Feature branch
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) +) + |