DmitrMakeev commited on
Commit
b8cc894
·
verified ·
1 Parent(s): 4dbc526

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -23
app.py CHANGED
@@ -38,29 +38,6 @@ if not os.path.exists(UPLOAD_FOLDER):
38
 
39
 
40
 
41
- # Создание базы данных и таблицы
42
- DATABASES = ['data1.db', 'data2.db', 'data3.db', 'data4.db', 'data5.db']
43
-
44
- def init_db(db_name):
45
- try:
46
- conn = sqlite3.connect(db_name)
47
- cursor = conn.cursor()
48
- cursor.execute('''
49
- CREATE TABLE IF NOT EXISTS contacts (
50
- id INTEGER PRIMARY KEY AUTOINCREMENT,
51
- name TEXT NOT NULL,
52
- phone TEXT NOT NULL,
53
- email TEXT NOT NULL
54
- )
55
- ''')
56
- conn.commit()
57
- conn.close()
58
- except Exception as e:
59
- print(f"Error initializing database {db_name}: {e}")
60
-
61
- for db in DATABASES:
62
- init_db(db)
63
-
64
 
65
 
66
 
 
38
 
39
 
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
 
43