1. Fix pagination at frontend.

2. Add alter table on backend to create column notified with default value 0.
3. Add notified column on creation of database table of new user.
This commit is contained in:
kostis30fyllou 2019-05-31 16:42:39 +03:00
parent cbfe3c2e6e
commit 5bf029b378
1 changed files with 2 additions and 1 deletions

View File

@ -403,7 +403,7 @@ class InitialClientHandshakeHandler(BaseHandler):
cursor.execute('''CREATE TABLE community(id)''', parse=False)
cursor.execute('''INSERT INTO community VALUES(?)''', (community_id,), parse=False)
cursor.execute('''DROP TABLE IF EXISTS database''', parse=False)
cursor.execute('''CREATE TABLE database(id,name,datecreated,status,matches,docname,docsnumber)''', parse=False)
cursor.execute('''CREATE TABLE database(id,name,datecreated,status,matches,docname,docsnumber,notified)''', parse=False)
cursor.close()
else:
cursor=madis.functions.Connection(database_file_name).cursor()
@ -462,6 +462,7 @@ class GetUsersProfilesHandler(BaseHandler):
return
# get the database cursor
cursor=madis.functions.Connection(database_file_name).cursor()
cursor.execute('''ALTER TABLE database ADD COLUMN notified INTEGER DEFAULT 0''')
try:
# get community id
community_id = [r for r in cursor.execute('''SELECT id FROM community''')][0]