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:
slava 2025-05-06 10:28:16 +07:00
parent cab12293aa
commit 1bf701e3f4
2 changed files with 24 additions and 5 deletions

Binary file not shown.

View File

@ -42,8 +42,27 @@ CREATE TABLE IF NOT EXISTS transactions
( (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY AUTOINCREMENT,
account_id INTEGER, account_id INTEGER,
amount REAL, amount REAL,
fee REAL,
status TEXT,
type TEXT,
phone TEXT,
name TEXT,
short_description TEXT,
updated_short_description TEXT,
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, timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (account_id) REFERENCES accounts (id) ON DELETE CASCADE, FOREIGN KEY (account_id) REFERENCES accounts (id) ON DELETE CASCADE,
UNIQUE (amount, timestamp) UNIQUE (amount, timestamp)