Files
ppanel-web/migrations/postgres/02121_user_withdrawal.sql
T
Ember Moth 5de9508963 fix bugs
2026-07-05 22:35:53 +08:00

17 lines
705 B
SQL

CREATE TABLE IF NOT EXISTS "withdrawals" (
"id" BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL,
"user_id" BIGINT NOT NULL,
"amount" BIGINT NOT NULL,
"content" TEXT,
"status" SMALLINT NOT NULL DEFAULT 0,
"reason" VARCHAR(500) NOT NULL DEFAULT '',
"created_at" TIMESTAMP NOT NULL,
"updated_at" TIMESTAMP NOT NULL,
PRIMARY KEY ("id")
);
CREATE INDEX IF NOT EXISTS "withdrawals_idx_user_id" ON "withdrawals" ("user_id");
INSERT INTO "system" ("category", "key", "value", "type", "desc", "created_at", "updated_at")
VALUES
('invite', 'WithdrawalMethod', '', 'string', 'withdrawal method', '2025-04-22 14:25:16.637', '2025-04-22 14:25:16.637') ON CONFLICT DO NOTHING;