1
0
forked from BRT/arc

Expand transactions table schema to include additional fields.

Added new columns such as fee, status, type, phone, name, and timestamps to support enhanced transaction tracking and metadata. Ensured compatibility with existing relationships and constraints, maintaining data integrity.
This commit is contained in:
trnsmkot 2025-05-06 10:28:16 +07:00
parent 91b9a4e29f
commit 6a83f83ade
2 changed files with 24 additions and 5 deletions

Binary file not shown.

View File

@ -40,11 +40,30 @@ CREATE TABLE IF NOT EXISTS accounts
CREATE TABLE IF NOT EXISTS transactions
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
account_id INTEGER,
amount REAL,
description TEXT,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
id INTEGER PRIMARY KEY AUTOINCREMENT,
account_id INTEGER,
amount REAL,
fee REAL,
status TEXT,
type TEXT,
phone TEXT,
name TEXT,
short_description TEXT,
updated_short_description TEXT,
description TEXT,
updated_description TEXT,
bank_name TEXT,
bank_time TEXT,
tr_external_id TEXT,
update_time DATETIME,
complete_time DATETIME,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (account_id) REFERENCES accounts (id) ON DELETE CASCADE,
UNIQUE (amount, timestamp)
);