38873-vm/db/migrations/20_wallet_transactions.sql
Flatlogic Bot fb4133a854 v50
2026-02-28 22:38:01 +00:00

10 lines
377 B
SQL

CREATE TABLE IF NOT EXISTS wallet_transactions (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL,
amount DECIMAL(15,2) NOT NULL,
type ENUM('add', 'withdraw', 'investment_out', 'investment_in') NOT NULL,
description VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);