MT#5879 Change is_active field to boolean and add unique index to (reseller_id,is_active) so maintain only one active template per reseller.

agranig/subprof
Irina Peshinskaya 13 years ago
parent 4dd652c696
commit 653d869654

@ -0,0 +1,4 @@
USE billing;
ALTER TABLE invoice_template MODIFY is_active int(1) unsigned NOT NULL DEFAULT '1';
ALTER TABLE `invoice_template` DROP INDEX `invoice_template_reseller_active_UNIQUE`;

@ -0,0 +1,6 @@
USE billing;
ALTER TABLE invoice_template MODIFY is_active boolean not null default 0;
ALTER TABLE `invoice_template`
ADD UNIQUE INDEX `invoice_template_reseller_active_UNIQUE` (`reseller_id`,`is_active`);
Loading…
Cancel
Save