diff --git a/export.py b/export.py index 70ad0f62a5aba64c424099587025e41d8973e3a1..28dacbebd0b8caffdc87a0cb64e22efe3250a894 100644 --- a/export.py +++ b/export.py @@ -6,8 +6,8 @@ import sqlite3 create_table = """ CREATE TABLE WEB_URL( - ID INTEGER PRIMARY KEY AUTOINCREMENT, - LONG_URL TEXT NOT NULL, SHORT_URL TEXT NOT NULL + LONG_URL TEXT NOT NULL + SHORT_URL TEXT NOT NULL ); """ with sqlite3.connect('db/urls.db') as conn: diff --git a/import.py b/import.py index 976ce4b57866686b4ea082dc09e25d90e1c7849d..fc908c526f7e80d95f2c3417a511bc0a7a971deb 100644 --- a/import.py +++ b/import.py @@ -7,8 +7,8 @@ from tqdm import tqdm def table_check(): #Check if database exists create_table = """ CREATE TABLE WEB_URL( - ID INTEGER PRIMARY KEY AUTOINCREMENT, - LONG_URL TEXT NOT NULL, SHORT_URL TEXT NOT NULL + LONG_URL TEXT NOT NULL, + SHORT_URL TEXT NOT NULL ); """ with sqlite3.connect('db/urls.db') as conn: diff --git a/main.py b/main.py index 99f40b34831c4af27f74c8cf3fbf1b96824f1be3..35e92eab07364cbd5e94da91410d44cc8f921a3e 100644 --- a/main.py +++ b/main.py @@ -12,7 +12,7 @@ domain_to_index = {} domain_prepared = "" try: - domain = os.environ["domains"].split(";") #Get the domains from the enviorement variable. If no envioremenr variable is set set it to 127.0.0.1:5000 (for testing) + domain = os.environ["domains"].split(";") #Get the domains from the enviorement variable. If no enviorement variable is set set it to 127.0.0.1:5000 (for testing) except: domain = ["127.0.0.1:5000"] @@ -24,7 +24,7 @@ except: pass #This exception is only to pass it while testing try: - if(os.environ["production"] == "1"): #If you use this in production, please set this to 1, because the Flask Testserver is not very secure + if(os.environ["production"] == "1"): #If you use this in production, please set this to 1, because the Flask Testserver is not very secure (e.g. shows error on Website) production = True else: production = False @@ -42,8 +42,8 @@ for domains in domain: #Make from every domnain a entry for the select box later def table_check(): create_table = """ CREATE TABLE WEB_URL( - ID INTEGER PRIMARY KEY AUTOINCREMENT, - LONG_URL TEXT NOT NULL, SHORT_URL TEXT NOT NULL + LONG_URL TEXT NOT NULL, + SHORT_URL TEXT NOT NULL ); """ with sqlite3.connect('db/urls.db') as conn: