-- Deploy gaia:pay_2015_11_06_create_table_pay_alipaytrefund to mysql

BEGIN;

CREATE TABLE `pay_alipayrefund` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `order_no` varchar(12) NOT NULL,
    `refund_fee` integer NOT NULL,
	`created_at` datetime(6) NOT NULL,
    `trade_no` varchar(64) NOT NULL,
    `trade_status` varchar(64) NOT NULL,
    `notify_id` longtext NOT NULL,
    `batch_no` longtext NOT NULL
);

ALTER TABLE `pay_wechatrefund` ADD `created_at` datetime(6) NOT NULL DEFAULT ' 1970-01-01';

COMMIT;
