aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app.py8
-rw-r--r--db_creation.py13
2 files changed, 15 insertions, 6 deletions
diff --git a/app.py b/app.py
index 39c96e0..a390406 100644
--- a/app.py
+++ b/app.py
@@ -8,14 +8,14 @@ Created on Sun Jan 17 09:38:19 2021
# app.py
from flask import Flask
-from flask_debugtoolbar import DebugToolbarExtension
+# from flask_debugtoolbar import DebugToolbarExtension
from flask_sqlalchemy import SQLAlchemy
-from key_gen import get_key
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///justice.db'
app.config["SQLALCHEMY_ECHO"] = True
app.debug = True
-app.secret_key = get_key
-toolbar = DebugToolbarExtension(app)
+# SELECT YOUR OWN SECRET KEY
+app.secret_key = ""
+# toolbar = DebugToolbarExtension(app)
db = SQLAlchemy(app) \ No newline at end of file
diff --git a/db_creation.py b/db_creation.py
index a05b35e..c1f0cc1 100644
--- a/db_creation.py
+++ b/db_creation.py
@@ -737,16 +737,25 @@ def create_indices(conn):
"osoba_id"
); """
+ statutarni_organy_relation_5 = """ CREATE INDEX "index statutarni organ relation 5" ON "statutarni_organ_clen_relation" (
+ "prav_osoba_id"
+); """
+
dr_relation_3 = """ CREATE INDEX "index dr clen relation3" ON "dr_organ_clen_relation" (
"osoba_id"
); """
+
+ dr_relation_4 = """ CREATE INDEX "index dr clen relation4" ON "dr_organ_clen_relation" (
+ "pravnicka_osoba_id"
+); """
+
akcionari3 = """ CREATE INDEX "index akcionari3" ON "jediny_akcionar" (
"akcionar_fo_id"
); """
list_of_indices = [companies1, companies2, companies3, companies4, companies5, adresy1, adresy2, adresy3,
- akcie, akcie2, akcionari1, akcionari2, akcionari3, dr_clen_relation1, dr_clen_relation2, dr_relation, dr_relation2, dr_relation_3,
+ akcie, akcie2, akcionari1, akcionari2, akcionari3, dr_clen_relation1, dr_clen_relation2, dr_relation, dr_relation2, dr_relation_3, dr_relation_4,
insolvency1, insolvency2, konkurz1, konkurz2, nazvy1, nazvy2, nazvy3, ostatni_skutecnosti, ostatni_skutecnosti2,
pocty_clenu_organ1, pocty_clenu_organ2, podily1, podily2, pravni_formy, pravni_formy_relation1, pravni_formy_relation2,
predmety_cinnosti_relation1, predmety_cinnosti_relation2, predmety_cinnosti_relation3, predmety_podnikani_relation1, predmety_podnikani_relation2,
@@ -754,7 +763,7 @@ def create_indices(conn):
prokuriste2, prokuriste3, prokuriste4, sidlo_relation1, sidlo_relation_2, sidlo_relation_3, soudni_zapis1, soudni_zapis2, spolecnici1,
spolecnici2, spolecnici3, spolecnici4, spolecnici5, statutarni_organy, statutarni_organy_relation1, statutarni_organy_relation2,
statutarni_organy_relation_3, statutarni_organy_relation_4, zakladni_kapital1, zakladni_kapital2, zpusob_jednani, zpusob_jednani_relation1, zpusob_jednani_relation2,
- zpusob_jednani_relation3, pravnicke_osoby1, pravnicke_osoby2, pravnicke_osoby3, pravnicke_osoby4, fyzicke_osoby1, ucel1, ucel2, ucel_relation1, ucel_relation2, ucel_relation3]
+ zpusob_jednani_relation3, pravnicke_osoby1, pravnicke_osoby2, pravnicke_osoby3, pravnicke_osoby4, statutarni_organy_relation_5, fyzicke_osoby1, ucel1, ucel2, ucel_relation1, ucel_relation2, ucel_relation3]
i = 0
for elem in list_of_indices:
i += 1