aboutsummaryrefslogtreecommitdiffstats
path: root/db_creation.py
diff options
context:
space:
mode:
Diffstat (limited to 'db_creation.py')
-rw-r--r--db_creation.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/db_creation.py b/db_creation.py
index c1f0cc1..9aeb780 100644
--- a/db_creation.py
+++ b/db_creation.py
@@ -113,7 +113,9 @@ def create_tables(conn):
"prijmeni" TEXT,
"titul_za" TEXT,
"datum_naroz" TEXT,
- UNIQUE("titul_pred","jmeno","prijmeni","titul_za","datum_naroz"),
+ "adresa_id" INTEGER,
+ UNIQUE("titul_pred","jmeno","prijmeni","titul_za","datum_naroz","adresa_id"),
+ FOREIGN KEY("adresa_id") REFERENCES "adresy_v2"("id"),
PRIMARY KEY("id" AUTOINCREMENT)
); """