X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sql%2Falter2.2.sql;h=486b1f50d758bb91d747662262a3231ad302aff5;hb=40048ce06ec19e91186a38b841b03038ddd6107f;hp=61edd4a84d5b99956e319929fcecb91aefae9904;hpb=902f1015d874c33bd7946b17de2ad80b4f2144b6;p=fa-stable.git diff --git a/sql/alter2.2.sql b/sql/alter2.2.sql index 61edd4a8..486b1f50 100644 --- a/sql/alter2.2.sql +++ b/sql/alter2.2.sql @@ -93,8 +93,16 @@ CREATE TABLE `0_security_roles` ( `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `role` (`role`) -) TYPE=MyISAM AUTO_INCREMENT=8 AUTO_INCREMENT=8 ; +) TYPE=MyISAM AUTO_INCREMENT=1; ALTER TABLE `0_company` ADD COLUMN `login_tout` SMALLINT(6) NOT NULL DEFAULT '600'; ALTER TABLE `0_users` CHANGE COLUMN `full_access` `role_id` int(11) NOT NULL default '1'; +ALTER TABLE `0_sales_order_details` ADD COLUMN `trans_type` SMALLINT(6) NOT NULL DEFAULT '30' AFTER `order_no`; +ALTER TABLE `0_sales_orders` CHANGE COLUMN `order_no` `order_no` int(11) NOT NULL; +ALTER TABLE `0_sales_orders` ADD COLUMN `trans_type` SMALLINT(6) NOT NULL DEFAULT '30' AFTER `order_no`; +ALTER TABLE `0_sales_orders` ADD COLUMN `reference` varchar(100) NOT NULL DEFAULT '' AFTER `branch_code`; +ALTER TABLE `0_sales_orders` DROP PRIMARY KEY; +ALTER TABLE `0_sales_orders` ADD PRIMARY KEY ( `trans_type` , `order_no` ); +UPDATE `0_sales_orders` SET `reference`=`order_no` WHERE 1; +INSERT INTO `0_sys_types` (`type_id`, `type_no`, `next_reference`) VALUES (32, 0, '1'); \ No newline at end of file