diff --git a/db_scripts/diff/15041.down b/db_scripts/diff/15041.down new file mode 100644 index 00000000..d6d10e67 --- /dev/null +++ b/db_scripts/diff/15041.down @@ -0,0 +1,3 @@ +USE billing; + +DROP TABLE `invoice_template`; diff --git a/db_scripts/diff/15041.up b/db_scripts/diff/15041.up new file mode 100644 index 00000000..de8e3b30 --- /dev/null +++ b/db_scripts/diff/15041.up @@ -0,0 +1,13 @@ +USE billing; + + CREATE TABLE `invoice_template` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `reseller_id` int(11) unsigned NOT NULL, + `type` enum('svg','html') NOT NULL DEFAULT 'svg', + `is_active` int(1) unsigned NOT NULL DEFAULT '1', + `base64_saved` mediumblob, + `base64_previewed` mediumblob, + PRIMARY KEY (`id`), + KEY `reseller_contract_ind` (`reseller_id`), + CONSTRAINT `invoice_template_ibfk_1` FOREIGN KEY (`reseller_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; \ No newline at end of file