aboutsummaryrefslogtreecommitdiffstats
path: root/db_creation.py
diff options
context:
space:
mode:
authorPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2021-06-10 23:36:54 +0200
committerPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2021-06-10 23:36:54 +0200
commitcc86be247b6e10ccc0d21771c8d3583eb501b54e (patch)
tree2687f6e511d283621fc5b1d171cd3bccac926947 /db_creation.py
parenta52388e1a55bb973c401350d9fb4633ef185ee61 (diff)
downloadjustice-cc86be247b6e10ccc0d21771c8d3583eb501b54e.tar.gz
updating the ubo feature
Diffstat (limited to 'db_creation.py')
-rw-r--r--db_creation.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/db_creation.py b/db_creation.py
index 55e7f32..cf9d504 100644
--- a/db_creation.py
+++ b/db_creation.py
@@ -363,22 +363,22 @@ def create_tables(conn):
ubo = """ CREATE TABLE "ubo" (
"id" INTEGER NOT NULL UNIQUE,
"company_id" INTEGER NOT NULL,
- "UBO_id" INTEGER NOT NULL,
+ "UBO_id" INTEGER NOT NULL,
+ "adresa_id" INTEGER,
"zapis_datum" DATE,
"vymaz_datum" DATE,
- "UBO_valid" TEXT,
- "spravce" TEXT,
- "T_TBC" TEXT,
- "postaveni_jinak" TEXT,
- "postaveni" TEXT,
- "primaUcast" TEXT,
- "primaUcastPodil" TEXT,
- "rozdeleniProstredku" TEXT,
- "slovni_vyjadreni" TEXT,
- "urcenPoziciVeStatOrg" TEXT,
- "email" TEXT,
+ "postaveni" TEXT,
+ "koncovyPrijemceText" TEXT,
+ "skutecnymMajitelemOd" TEXT,
+ "vlastniPodilNaProspechu" TEXT,
+ "vlastniPodilNaProspechu_typ" TEXT,
+ "vlastniPodilNaProspechu_textValue" TEXT,
+ "vlastniPodilNaHlasovani" TEXT,
+ "vlastniPodilNaHlasovani_typ" TEXT,
+ "vlastniPodilNaHlasovani_value" TEXT,
FOREIGN KEY("company_id") REFERENCES "companies"("id"),
FOREIGN KEY("UBO_id") REFERENCES "fyzicke_osoby"("id"),
+ FOREIGN KEY("adresa_id") REFERENCES "adresy_v2"("id"),
PRIMARY KEY("id" AUTOINCREMENT)
); """
@@ -724,6 +724,9 @@ def create_indices(conn):
"UBO_id"
); """
+ ubo4 = """ CREATE INDEX "index ubo4" ON "ubo" (
+ "UBO_adresa_id"
+); """
ucel1 = """ CREATE INDEX "index ucel1" ON "ucel" (
"ucel"