aboutsummaryrefslogtreecommitdiffstats
path: root/db_creation
diff options
context:
space:
mode:
authorPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2021-02-08 21:27:53 +0100
committerPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2021-02-08 21:27:53 +0100
commitd0e2a39f694324815e263f0587e6827f7ef26f09 (patch)
treef0919ef1102e2acf84eea8d7eea00b8d7928e6d7 /db_creation
parentd0458229daf205f2da50f40fa0ea59b20be5513e (diff)
downloadjustice-d0e2a39f694324815e263f0587e6827f7ef26f09.tar.gz
clean up changes
Diffstat (limited to 'db_creation')
-rw-r--r--db_creation31
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)
+)
+