yusufgundogdu commited on
Commit
0a0dc86
·
verified ·
1 Parent(s): fa7a809

Update database.py

Browse files
Files changed (1) hide show
  1. database.py +4 -4
database.py CHANGED
@@ -31,7 +31,7 @@ def init_db(app):
31
  CREATE TABLE IF NOT EXISTS users (
32
  id INTEGER PRIMARY KEY AUTOINCREMENT,
33
  udid TEXT NOT NULL UNIQUE,
34
- name TEXT DEFAULT '',
35
  premium_account BOOLEAN DEFAULT FALSE,
36
  usage_limit INTEGER DEFAULT 10,
37
  invoice TEXT DEFAULT ''
@@ -40,8 +40,8 @@ def init_db(app):
40
 
41
  cursor.execute('SELECT COUNT(*) FROM users')
42
  if cursor.fetchone()[0] == 0:
43
- cursor.executemany('INSERT INTO users (udid, name, premium_account, usage_limit, invoice) VALUES (?, ?, ?, ?, ?)',
44
- [('test_udid_1', 'Test User 1', True, 4, 'test_invoice_1'),
45
- ('test_udid_2', 'Test User 2', False, 4, 'test_invoice_2')])
46
 
47
  db.commit()
 
31
  CREATE TABLE IF NOT EXISTS users (
32
  id INTEGER PRIMARY KEY AUTOINCREMENT,
33
  udid TEXT NOT NULL UNIQUE,
34
+ platform TEXT DEFAULT '',
35
  premium_account BOOLEAN DEFAULT FALSE,
36
  usage_limit INTEGER DEFAULT 10,
37
  invoice TEXT DEFAULT ''
 
40
 
41
  cursor.execute('SELECT COUNT(*) FROM users')
42
  if cursor.fetchone()[0] == 0:
43
+ cursor.executemany('INSERT INTO users (udid, platform, premium_account, usage_limit, invoice) VALUES (?, ?, ?, ?, ?)',
44
+ [('test_udid_1', 'AND', True, 4, 'test_invoice_1'),
45
+ ('test_udid_2', 'IOS', False, 4, 'test_invoice_2')])
46
 
47
  db.commit()