This commit is contained in:
Ember Moth
2026-07-05 20:27:58 +08:00
commit 2744c70c5c
837 changed files with 53059 additions and 0 deletions
@@ -0,0 +1,23 @@
-- migrate:up
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;
-- migrate:down
DROP TABLE IF EXISTS "withdrawals";
DELETE FROM "system"
WHERE "category" = 'invite'
AND "key" = 'WithdrawalMethod';