feat(transaction): #66 implement transactions
This commit was merged in pull request #72.
This commit is contained in:
@@ -5,9 +5,9 @@ CREATE TABLE account (
|
||||
|
||||
name TEXT NOT NULL,
|
||||
|
||||
current_balance int64 NOT NULL,
|
||||
current_balance INTEGER NOT NULL,
|
||||
last_transaction DATETIME,
|
||||
oink_balance int64 NOT NULL,
|
||||
oink_balance INTEGER NOT NULL,
|
||||
|
||||
created_at DATETIME NOT NULL,
|
||||
created_by TEXT NOT NULL,
|
||||
|
||||
@@ -6,7 +6,7 @@ CREATE TABLE treasure_chest (
|
||||
|
||||
name TEXT NOT NULL,
|
||||
|
||||
current_balance int64 NOT NULL,
|
||||
current_balance INTEGER NOT NULL,
|
||||
|
||||
created_at DATETIME NOT NULL,
|
||||
created_by TEXT NOT NULL,
|
||||
|
||||
17
migration/004_transaction.up.sql
Normal file
17
migration/004_transaction.up.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
CREATE TABLE "transaction" (
|
||||
id TEXT NOT NULL UNIQUE PRIMARY KEY,
|
||||
user_id TEXT NOT NULL,
|
||||
|
||||
timestamp DATETIME NOT NULL,
|
||||
note TEXT NOT NULL,
|
||||
|
||||
account_id TEXT,
|
||||
treasure_chest_id TEXT,
|
||||
value INTEGER NOT NULL,
|
||||
|
||||
created_at DATETIME NOT NULL,
|
||||
created_by TEXT NOT NULL,
|
||||
updated_at DATETIME,
|
||||
updated_by TEXT
|
||||
) WITHOUT ROWID;
|
||||
Reference in New Issue
Block a user