From 3c6d96c18e401d6e80e9d8299960902e4d2be12f Mon Sep 17 00:00:00 2001 From: Irina Peshinskaya Date: Mon, 31 Mar 2014 11:48:51 +0200 Subject: [PATCH] MT#5879 Add name column to invoices template, necessary changes for further pdf templating, marker for customers and their subscribers about sending/not sending invoices. --- db_scripts/diff/15051.down | 3 +++ db_scripts/diff/15051.up | 3 +++ db_scripts/diff/15052.down | 16 ++++++++++++++++ db_scripts/diff/15052.up | 13 +++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 db_scripts/diff/15051.down create mode 100644 db_scripts/diff/15051.up create mode 100644 db_scripts/diff/15052.down create mode 100644 db_scripts/diff/15052.up diff --git a/db_scripts/diff/15051.down b/db_scripts/diff/15051.down new file mode 100644 index 00000000..6532d897 --- /dev/null +++ b/db_scripts/diff/15051.down @@ -0,0 +1,3 @@ +use billing; + +alter table contracts drop column send_invoice; \ No newline at end of file diff --git a/db_scripts/diff/15051.up b/db_scripts/diff/15051.up new file mode 100644 index 00000000..c9c2ebb2 --- /dev/null +++ b/db_scripts/diff/15051.up @@ -0,0 +1,3 @@ +use billing; + +alter table contracts add column send_invoice boolean not null default 1; diff --git a/db_scripts/diff/15052.down b/db_scripts/diff/15052.down new file mode 100644 index 00000000..13bba944 --- /dev/null +++ b/db_scripts/diff/15052.down @@ -0,0 +1,16 @@ +use billing; + + +DROP TABLE `invoice_template_resource`; + +alter table invoice_template + drop column name, + drop column x_title, + drop column y_title, + drop column rows_title, + drop column x_mid, + drop column y_mid, + drop column rows_mid, + drop column x_last, + drop column y_last, + drop column rows_last; \ No newline at end of file diff --git a/db_scripts/diff/15052.up b/db_scripts/diff/15052.up new file mode 100644 index 00000000..1dc7e85d --- /dev/null +++ b/db_scripts/diff/15052.up @@ -0,0 +1,13 @@ +use billing; + +CREATE TABLE `invoice_template_resource` ( + `invoice_template_id` int(11) unsigned NOT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT '0', + `type` enum('css') DEFAULT NULL, + `base64` mediumblob, + KEY `invoice_template_id` (`invoice_template_id`), + CONSTRAINT `invoice_template_resource_ibfk_1` FOREIGN KEY (`invoice_template_id`) REFERENCES `invoice_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; + +alter table invoice_template add column name varchar(255) not null default '', add column x_title mediumint not null default 0, add column y_title mediumint not null default 0, add column rows_title mediumint not null default 0, add column x_mid mediumint not null default 0, add column y_mid mediumint not null default 0, add column rows_mid mediumint not null default 0, add column x_last mediumint not null default 0,add column y_last mediumint not null default 0, add column rows_last mediumint not null default 0; +