X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sql%2Falter2.1.sql;h=e6057e4d5ef74488dafae4cff1647ca992dfc1b5;hb=59840905a38c4e08e5b13fdb7af71ea6dea7b1f0;hp=529f2d10bbb69620c446734b2f5afa481aa0df3d;hpb=4301c9cda0f510cc52335408380b368e51c2a663;p=fa-stable.git diff --git a/sql/alter2.1.sql b/sql/alter2.1.sql index 529f2d10..e6057e4d 100644 --- a/sql/alter2.1.sql +++ b/sql/alter2.1.sql @@ -1,3 +1,14 @@ +ALTER TABLE `0_bank_accounts` DROP PRIMARY KEY; +ALTER TABLE `0_bank_accounts` ADD `id` SMALLINT(6) AUTO_INCREMENT PRIMARY KEY; +ALTER TABLE `0_bank_accounts` ADD KEY (`account_code`); + +# Version for any MySQL but usable with digital only gl account codes: +# UPDATE 0_bank_accounts SET id = account_code; +# For any Applicable only to MySQL >=4.0.4 : +UPDATE `0_bank_trans`, `0_bank_accounts` SET 0_bank_trans.bank_act=0_bank_accounts.id + WHERE 0_bank_trans.bank_act=0_bank_accounts.account_code; */ + + ALTER TABLE `0_users` ADD `query_size` TINYINT(1) DEFAULT '10'; DROP TABLE IF EXISTS `0_sales_pos`; @@ -13,8 +24,7 @@ CREATE TABLE `0_sales_pos` ( UNIQUE KEY(`pos_name`) ) ENGINE=MyISAM AUTO_INCREMENT=3; -INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '1705'); -INSERT INTO `0_sales_pos` VALUES ('2', 'Cash sale', '1', '0', 'CWA', '1705'); +INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '1'); ALTER TABLE `0_users` ADD `pos` SMALLINT(6) DEFAULT '1';