DmitrMakeev commited on
Commit
66a3422
1 Parent(s): a6777f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -36
app.py CHANGED
@@ -76,42 +76,42 @@ def init_db(db_name):
76
  cursor = conn.cursor()
77
  cursor.execute('''
78
  CREATE TABLE IF NOT EXISTS contacts (
79
- id INTEGER PRIMARY KEY,
80
- name TEXT DEFAULT '',
81
- phone TEXT DEFAULT '',
82
- email TEXT DEFAULT '',
83
- vk_id TEXT DEFAULT '',
84
- chat_id TEXT DEFAULT '',
85
- ws_st TEXT DEFAULT '',
86
- ws_stop TEXT DEFAULT '',
87
- web_st TEXT DEFAULT '',
88
- fin_prog TEXT DEFAULT '',
89
- b_city TEXT DEFAULT '',
90
- b_fin TEXT DEFAULT '',
91
- b_ban TEXT DEFAULT '',
92
- b_ign TEXT DEFAULT '',
93
- b_baners TEXT DEFAULT '',
94
- b_butt TEXT DEFAULT '',
95
- b_mess TEXT DEFAULT '',
96
- shop_st TEXT DEFAULT '',
97
- curator TEXT DEFAULT '',
98
- pr1 TEXT DEFAULT '',
99
- pr2 TEXT DEFAULT '',
100
- pr3 TEXT DEFAULT '',
101
- pr4 TEXT DEFAULT '',
102
- pr5 TEXT DEFAULT '',
103
- gc_url TEXT DEFAULT '',
104
- key_pr TEXT DEFAULT '',
105
- n_con TEXT DEFAULT '',
106
- canal TEXT DEFAULT '',
107
- data_on TEXT DEFAULT '',
108
- data_t TEXT DEFAULT '',
109
- utm_source TEXT DEFAULT '',
110
- utm_medium TEXT DEFAULT '',
111
- utm_campaign TEXT DEFAULT '',
112
- utm_term TEXT DEFAULT '',
113
- utm_content TEXT DEFAULT '',
114
- gcpc TEXT DEFAULT ''
115
  )
116
  ''')
117
  conn.commit()
@@ -121,6 +121,8 @@ for db in DATABASES:
121
  init_db(db)
122
 
123
 
 
 
124
  template = {
125
  "username": "name",
126
  "phone": "phone",
 
76
  cursor = conn.cursor()
77
  cursor.execute('''
78
  CREATE TABLE IF NOT EXISTS contacts (
79
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
80
+ name TEXT NOT NULL,
81
+ phone TEXT NOT NULL,
82
+ email TEXT NOT NULL,
83
+ vk_id TEXT,
84
+ chat_id TEXT,
85
+ ws_st TEXT,
86
+ ws_stop TEXT,
87
+ web_st INTEGER,
88
+ fin_prog INTEGER,
89
+ b_city TEXT,
90
+ b_fin TEXT,
91
+ b_ban TEXT,
92
+ b_ign TEXT,
93
+ b_baners TEXT,
94
+ b_butt TEXT,
95
+ b_mess TEXT,
96
+ shop_st TEXT,
97
+ curator TEXT,
98
+ pr1 TEXT,
99
+ pr2 TEXT,
100
+ pr3 TEXT,
101
+ pr4 TEXT,
102
+ pr5 TEXT,
103
+ gc_url TEXT,
104
+ key_pr TEXT,
105
+ n_con TEXT,
106
+ canal TEXT,
107
+ data_on TEXT,
108
+ data_t TEXT,
109
+ utm_source TEXT,
110
+ utm_medium TEXT,
111
+ utm_campaign TEXT,
112
+ utm_term TEXT,
113
+ utm_content TEXT,
114
+ gcpc TEXT
115
  )
116
  ''')
117
  conn.commit()
 
121
  init_db(db)
122
 
123
 
124
+
125
+
126
  template = {
127
  "username": "name",
128
  "phone": "phone",