updated and balance
This commit is contained in:
@@ -18,6 +18,9 @@ CREATE TABLE demo_bank_accounts (
|
|||||||
ALTER TABLE ONLY demo_bank_accounts
|
ALTER TABLE ONLY demo_bank_accounts
|
||||||
ADD CONSTRAINT demo_bank_accounts_id_key UNIQUE (id);
|
ADD CONSTRAINT demo_bank_accounts_id_key UNIQUE (id);
|
||||||
|
|
||||||
|
ALTER TABLE demo_bank_accounts ADD balance INT DEFAULT 0;
|
||||||
|
ALTER TABLE demo_bank_accounts ADD updated TIMESTAMP;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE loan_offers (
|
CREATE TABLE loan_offers (
|
||||||
|
|||||||
+1
-1
@@ -144,7 +144,7 @@ def salary_demousers():
|
|||||||
dList = []
|
dList = []
|
||||||
|
|
||||||
|
|
||||||
SELECT_DEMO_ENTRY = f"SELECT id,uid, bvn AS CustomerID, mobile AS AccountID, name,offers,salary_account,current_loans,mobile,bvn, email, pin, added::text FROM demo_bank_accounts ORDER BY id ASC"
|
SELECT_DEMO_ENTRY = f"SELECT id,uid, bvn AS CustomerID, mobile AS AccountID, name,offers,salary_account,current_loans,mobile,bvn, email, pin, added::text, balance, updated::text AS updated FROM demo_bank_accounts ORDER BY id ASC"
|
||||||
# print(SELECT_DEMO_ENTRY)
|
# print(SELECT_DEMO_ENTRY)
|
||||||
with connection:
|
with connection:
|
||||||
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
||||||
|
|||||||
Reference in New Issue
Block a user