This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
-- Create accounts table
|
||||
CREATE TABLE accounts (
|
||||
account_id BIGINT PRIMARY KEY,
|
||||
balance DECIMAL(20, 10) NOT NULL
|
||||
balance DECIMAL(20, 2) NOT NULL
|
||||
);
|
||||
|
||||
-- Create transactions table for audit purposes
|
||||
@@ -9,7 +9,7 @@ CREATE TABLE transactions (
|
||||
transaction_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
source_account_id BIGINT NOT NULL,
|
||||
destination_account_id BIGINT NOT NULL,
|
||||
amount DECIMAL(20, 10) NOT NULL,
|
||||
amount DECIMAL(20, 2) NOT NULL,
|
||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
|
||||
FOREIGN KEY (source_account_id) REFERENCES accounts (account_id),
|
||||
FOREIGN KEY (destination_account_id) REFERENCES accounts (account_id)
|
||||
|
Reference in New Issue
Block a user