feat: add backend_v1 migration
Some checks failed
build quyun / Build (push) Has been cancelled

This commit is contained in:
2025-12-19 14:46:58 +08:00
parent 218eb4689c
commit 24bd161df9
119 changed files with 12259 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE orders(
id SERIAL8 PRIMARY KEY,
created_at timestamp NOT NULL DEFAULT now(),
updated_at timestamp NOT NULL DEFAULT now(),
order_no varchar(64) NOT NULL,
sub_order_no varchar(64) NOT NULL DEFAULT '',
transaction_id varchar(64) NOT NULL DEFAULT '',
refund_transaction_id varchar(64) NOT NULL DEFAULT '',
price int8 NOT NULL DEFAULT 0,
discount int2 NOT NULL DEFAULT 100,
currency varchar(10) NOT NULL DEFAULT 'CNY',
payment_method varchar(50) NOT NULL DEFAULT 'wechatpay',
post_id int8 NOT NULL,
user_id int8 NOT NULL,
status int2 NOT NULL,
meta jsonb NOT NULL DEFAULT '{}' ::jsonb
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE orders;
-- +goose StatementEnd