updated and balance

This commit is contained in:
CHIEFSOFT\ameye
2025-03-04 11:40:50 -05:00
parent be24d0aa51
commit cdc2fd129f
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -18,6 +18,9 @@ CREATE TABLE demo_bank_accounts (
ALTER TABLE ONLY demo_bank_accounts
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 (
+1 -1
View File
@@ -144,7 +144,7 @@ def salary_demousers():
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)
with connection:
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor: