-- Deploy gaia:2019_09_11_add_api_bdtransfermonthlywithdrawaltobudan to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_bdtransfermonthlywithdrawaltobudan` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `bdtransfermonth_id` integer NOT NULL,
    `budan_id` varchar(12) NOT NULL,
    `created_time` datetime(6) NOT NULL
)
;
ALTER TABLE `api_bdtransfermonthlywithdrawaltobudan` ADD CONSTRAINT `budan_id_refs_id_56824cfe` FOREIGN KEY (`budan_id`) REFERENCES `api_budan` (`id`);
ALTER TABLE `api_bdtransfermonthlywithdrawaltobudan` ADD CONSTRAINT `bdtransfermonth_id_refs_id_edf749e8` FOREIGN KEY (`bdtransfermonth_id`) REFERENCES `api_bdtransfermonth` (`id`);
CREATE INDEX `api_bdtransfermonthlywithdrawaltobudan_d0654f80` ON `api_bdtransfermonthlywithdrawaltobudan` (`bdtransfermonth_id`);
CREATE INDEX `api_bdtransfermonthlywithdrawaltobudan_8b223b59` ON `api_bdtransfermonthlywithdrawaltobudan` (`budan_id`);

COMMIT;
