From 9590ad6c04eed74a43c58e6176d9bf7bf77263ed Mon Sep 17 00:00:00 2001 From: Irka Date: Tue, 18 Feb 2014 13:59:48 +0100 Subject: [PATCH] MT#5879: invoice_template table --- db_scripts/diff/15041.down | 3 +++ db_scripts/diff/15041.up | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 db_scripts/diff/15041.down create mode 100644 db_scripts/diff/15041.up 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