I dont really remember what the first version installed was - I first installed around 2015, so whatever was current at the time. Initially I used the "US COA for a nonprofit company" and modified it as needed.
I just plugged the above sql/en_US-new.sql and a structure dump of my working database into the above Online MySQL Schema Compare and this is what it returned.
Do I want to run this SQL to update my schema? Is this safe?
Thanks
Bruce
DROP TABLE `0_amortisation`;
ALTER TABLE `0_areas` MODIFY `description` varchar(60) NOT NULL;
DROP TABLE `0_asset_types`;
DROP TABLE `0_asset_valuations`;
DROP TABLE `0_assets`;
ALTER TABLE `0_attachments` MODIFY `description` varchar(60) NOT NULL;
ALTER TABLE `0_attachments` MODIFY `filename` varchar(60) NOT NULL;
ALTER TABLE `0_attachments` MODIFY `filetype` varchar(60) NOT NULL;
ALTER TABLE `0_attachments` MODIFY `unique_name` varchar(60) NOT NULL;
ALTER TABLE `0_audit_trail` MODIFY `description` varchar(60) default NULL;
ALTER TABLE `0_audit_trail` MODIFY `fiscal_year` int(11) NOT NULL default 0;
ALTER TABLE `0_audit_trail` MODIFY `stamp` timestamp NOT NULL;
ALTER TABLE `0_bank_accounts` MODIFY `account_code` varchar(15) NOT NULL;
ALTER TABLE `0_bank_accounts` MODIFY `bank_account_name` varchar(60) NOT NULL;
ALTER TABLE `0_bank_accounts` MODIFY `bank_account_number` varchar(100) NOT NULL;
ALTER TABLE `0_bank_accounts` MODIFY `bank_address` tinytext;
ALTER TABLE `0_bank_accounts` MODIFY `bank_charge_act` varchar(15) NOT NULL;
ALTER TABLE `0_bank_accounts` MODIFY `bank_curr_code` char(3) NOT NULL;
ALTER TABLE `0_bank_accounts` MODIFY `bank_name` varchar(60) NOT NULL;
ALTER TABLE `0_bank_trans` MODIFY `bank_act` varchar(15) NOT NULL;
ALTER TABLE `0_bank_trans` MODIFY `ref` varchar(40) default NULL;
ALTER TABLE `0_bom` MODIFY `component` char(20) NOT NULL;
ALTER TABLE `0_bom` MODIFY `loc_code` char(5) NOT NULL;
ALTER TABLE `0_bom` MODIFY `parent` char(20) NOT NULL;
ALTER TABLE `0_budget_trans` MODIFY `account` varchar(15) NOT NULL;
ALTER TABLE `0_budget_trans` MODIFY `memo_` tinytext NOT NULL;
ALTER TABLE `0_chart_class` MODIFY `cid` varchar(3) NOT NULL;
ALTER TABLE `0_chart_class` MODIFY `class_name` varchar(60) NOT NULL;
ALTER TABLE `0_chart_master` MODIFY `account_code2` varchar(15) NOT NULL;
ALTER TABLE `0_chart_master` MODIFY `account_code` varchar(15) NOT NULL;
ALTER TABLE `0_chart_master` MODIFY `account_name` varchar(60) NOT NULL;
ALTER TABLE `0_chart_master` MODIFY `account_type` varchar(10) NOT NULL default '0';
ALTER TABLE `0_chart_types` MODIFY `class_id` varchar(3) NOT NULL;
ALTER TABLE `0_chart_types` MODIFY `id` varchar(10) NOT NULL;
ALTER TABLE `0_chart_types` MODIFY `name` varchar(60) NOT NULL;
ALTER TABLE `0_chart_types` MODIFY `parent` varchar(10) NOT NULL default '-1';
ALTER TABLE `0_comments` MODIFY `memo_` tinytext;
ALTER TABLE `0_credit_status` MODIFY `reason_description` char(100) NOT NULL;
ALTER TABLE `0_crm_categories` MODIFY `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department';
ALTER TABLE `0_crm_categories` MODIFY `description` tinytext NOT NULL COMMENT 'usage description';
ALTER TABLE `0_crm_categories` MODIFY `name` varchar(30) NOT NULL COMMENT 'for category selector';
ALTER TABLE `0_crm_categories` MODIFY `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer';
ALTER TABLE `0_crm_contacts` DROP `action`;
ALTER TABLE `0_crm_contacts` MODIFY `entity_id` varchar(11) default NULL COMMENT 'entity id in related class table';
ALTER TABLE `0_crm_contacts` DROP `type`;
ALTER TABLE `0_crm_contacts` MODIFY `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories';
ALTER TABLE `0_crm_persons` MODIFY `address` tinytext;
ALTER TABLE `0_crm_persons` MODIFY `email` varchar(100) default NULL;
ALTER TABLE `0_crm_persons` MODIFY `fax` varchar(30) default NULL;
ALTER TABLE `0_crm_persons` MODIFY `lang` char(5) default NULL;
ALTER TABLE `0_crm_persons` MODIFY `name2` varchar(60) default NULL;
ALTER TABLE `0_crm_persons` MODIFY `name` varchar(60) NOT NULL;
ALTER TABLE `0_crm_persons` MODIFY `notes` tinytext NOT NULL;
ALTER TABLE `0_crm_persons` MODIFY `phone2` varchar(30) default NULL;
ALTER TABLE `0_crm_persons` MODIFY `phone` varchar(30) default NULL;
ALTER TABLE `0_crm_persons` MODIFY `ref` varchar(30) NOT NULL;
ALTER TABLE `0_currencies` MODIFY `country` varchar(100) NOT NULL;
ALTER TABLE `0_currencies` MODIFY `curr_abrev` char(3) NOT NULL;
ALTER TABLE `0_currencies` MODIFY `curr_symbol` varchar(10) NOT NULL;
ALTER TABLE `0_currencies` MODIFY `currency` varchar(60) NOT NULL;
ALTER TABLE `0_currencies` MODIFY `hundreds_name` varchar(15) NOT NULL;
ALTER TABLE `0_cust_allocations` DROP INDEX `person_id`;
ALTER TABLE `0_cust_allocations` ADD UNIQUE `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`);
ALTER TABLE `0_cust_branch` MODIFY `bank_account` varchar(60) DEFAULT NULL;
ALTER TABLE `0_cust_branch` MODIFY `br_address` tinytext NOT NULL;
ALTER TABLE `0_cust_branch` MODIFY `br_name` varchar(60) NOT NULL;
ALTER TABLE `0_cust_branch` MODIFY `br_post_address` tinytext NOT NULL;
ALTER TABLE `0_cust_branch` MODIFY `branch_ref` varchar(30) NOT NULL;
ALTER TABLE `0_cust_branch` MODIFY `default_location` varchar(5) NOT NULL;
ALTER TABLE `0_cust_branch` MODIFY `notes` tinytext NOT NULL;
ALTER TABLE `0_cust_branch` MODIFY `payment_discount_account` varchar(15) NOT NULL;
ALTER TABLE `0_cust_branch` MODIFY `receivables_account` varchar(15) NOT NULL;
ALTER TABLE `0_cust_branch` MODIFY `sales_account` varchar(15) NOT NULL;
ALTER TABLE `0_cust_branch` MODIFY `sales_discount_account` varchar(15) NOT NULL;
DROP TABLE `0_dashboard_reminders`;
DROP TABLE `0_dashboard_widgets`;
ALTER TABLE `0_debtor_trans` MODIFY `reference` varchar(60) NOT NULL;
ALTER TABLE `0_debtor_trans` MODIFY PRIMARY KEY (`type`,`trans_no`,`debtor_no`);
ALTER TABLE `0_debtor_trans_details` MODIFY `description` tinytext;
ALTER TABLE `0_debtor_trans_details` MODIFY `stock_id` varchar(20) NOT NULL;
ALTER TABLE `0_debtor_trans_details` ADD KEY (`src_id`);
ALTER TABLE `0_debtor_trans_details` DROP INDEX `src_id`;
ALTER TABLE `0_debtors_master` MODIFY `address` tinytext;
ALTER TABLE `0_debtors_master` MODIFY `curr_code` char(3) NOT NULL;
ALTER TABLE `0_debtors_master` MODIFY `debtor_ref` varchar(30) NOT NULL;
ALTER TABLE `0_debtors_master` MODIFY `name` varchar(100) NOT NULL;
ALTER TABLE `0_debtors_master` MODIFY `notes` tinytext NOT NULL;
ALTER TABLE `0_debtors_master` MODIFY `tax_id` varchar(55) NOT NULL;
ALTER TABLE `0_dimensions` MODIFY `name` varchar(60) NOT NULL;
ALTER TABLE `0_dimensions` MODIFY `reference` varchar(60) NOT NULL;
ALTER TABLE `0_exchange_rates` MODIFY `curr_code` char(3) NOT NULL;
ALTER TABLE `0_gl_trans` MODIFY `account` varchar(15) NOT NULL;
ALTER TABLE `0_gl_trans` MODIFY `memo_` tinytext NOT NULL;
ALTER TABLE `0_grn_batch` MODIFY `loc_code` varchar(5) default NULL;
ALTER TABLE `0_grn_batch` MODIFY `rate` double NULL default '1';
ALTER TABLE `0_grn_batch` MODIFY `reference` varchar(60) NOT NULL;
ALTER TABLE `0_grn_items` MODIFY `description` tinytext;
ALTER TABLE `0_grn_items` MODIFY `item_code` varchar(20) NOT NULL;
ALTER TABLE `0_groups` MODIFY `description` varchar(60) NOT NULL;
DROP TABLE `0_import_paypal`;
DROP TABLE `0_import_paypal_accounts`;
ALTER TABLE `0_item_codes` MODIFY `description` varchar(200) NOT NULL;
ALTER TABLE `0_item_codes` MODIFY `item_code` varchar(20) NOT NULL;
ALTER TABLE `0_item_codes` MODIFY `stock_id` varchar(20) NOT NULL;
ALTER TABLE `0_item_tax_types` MODIFY `name` varchar(60) NOT NULL;
ALTER TABLE `0_item_units` MODIFY `abbr` varchar(20) NOT NULL;
ALTER TABLE `0_item_units` MODIFY `name` varchar(40) NOT NULL;
ALTER TABLE `0_journal` MODIFY `currency` char(3) NOT NULL;
ALTER TABLE `0_journal` MODIFY `reference` varchar(60) NOT NULL;
ALTER TABLE `0_journal` MODIFY `source_ref` varchar(60) NOT NULL;
ALTER TABLE `0_loc_stock` MODIFY `loc_code` char(5) NOT NULL;
ALTER TABLE `0_loc_stock` MODIFY `stock_id` char(20) NOT NULL;
ALTER TABLE `0_locations` MODIFY `contact` varchar(30) NOT NULL;
ALTER TABLE `0_locations` MODIFY `delivery_address` tinytext NOT NULL;
ALTER TABLE `0_locations` MODIFY `email` varchar(100) NOT NULL;
ALTER TABLE `0_locations` MODIFY `fax` varchar(30) NOT NULL;
ALTER TABLE `0_locations` MODIFY `loc_code` varchar(5) NOT NULL;
ALTER TABLE `0_locations` MODIFY `location_name` varchar(60) NOT NULL;
ALTER TABLE `0_locations` MODIFY `phone2` varchar(30) NOT NULL;
ALTER TABLE `0_locations` MODIFY `phone` varchar(30) NOT NULL;
ALTER TABLE `0_payment_terms` MODIFY `terms` char(80) NOT NULL;
ALTER TABLE `0_prices` MODIFY `curr_abrev` char(3) NOT NULL;
ALTER TABLE `0_prices` MODIFY `stock_id` varchar(20) NOT NULL;
ALTER TABLE `0_print_profiles` MODIFY `profile` varchar(30) NOT NULL;
ALTER TABLE `0_print_profiles` MODIFY `report` varchar(5) default NULL;
ALTER TABLE `0_printers` MODIFY `description` varchar(60) NOT NULL;
ALTER TABLE `0_printers` MODIFY `host` varchar(40) NOT NULL;
ALTER TABLE `0_printers` MODIFY `name` varchar(20) NOT NULL;
ALTER TABLE `0_printers` MODIFY `queue` varchar(20) NOT NULL;
ALTER TABLE `0_purch_data` MODIFY `stock_id` char(20) NOT NULL;
ALTER TABLE `0_purch_data` MODIFY `supplier_description` char(50) NOT NULL;
ALTER TABLE `0_purch_data` MODIFY `suppliers_uom` char(50) NOT NULL;
ALTER TABLE `0_purch_order_details` MODIFY `description` tinytext;
ALTER TABLE `0_purch_order_details` MODIFY `item_code` varchar(20) NOT NULL;
ALTER TABLE `0_purch_orders` MODIFY `comments` tinytext;
ALTER TABLE `0_purch_orders` MODIFY `delivery_address` tinytext NOT NULL;
ALTER TABLE `0_purch_orders` MODIFY `into_stock_location` varchar(5) NOT NULL;
ALTER TABLE `0_purch_orders` MODIFY `reference` tinytext NOT NULL;
ALTER TABLE `0_purch_orders` MODIFY `requisition_no` tinytext;
ALTER TABLE `0_quick_entries` MODIFY `base_desc` varchar(60) default NULL;
ALTER TABLE `0_quick_entries` MODIFY `description` varchar(60) NOT NULL;
ALTER TABLE `0_quick_entries` MODIFY `usage` varchar(120) NULL;
ALTER TABLE `0_quick_entry_lines` MODIFY `action` varchar(2) NOT NULL;
ALTER TABLE `0_quick_entry_lines` MODIFY `dest_id` varchar(15) NOT NULL;
ALTER TABLE `0_quick_entry_lines` MODIFY `memo` tinytext NOT NULL;
ALTER TABLE `0_recurrent_invoices` MODIFY `description` varchar(60) NOT NULL;
ALTER TABLE `0_reflines` MODIFY `description` varchar(60) NOT NULL;
ALTER TABLE `0_reflines` MODIFY `pattern` varchar(35) NOT NULL DEFAULT '1';
ALTER TABLE `0_reflines` MODIFY `prefix` char(5) NOT NULL;
ALTER TABLE `0_reflines` DROP INDEX `prefix`, ADD UNIQUE `prefix` (`trans_type`, `prefix`);
ALTER TABLE `0_refs` MODIFY `reference` varchar(100) NOT NULL;
DROP TABLE `0_requisition_details`;
DROP TABLE `0_requisitions`;
ALTER TABLE `0_sales_order_details` MODIFY `description` tinytext;
ALTER TABLE `0_sales_order_details` MODIFY `stk_code` varchar(20) NOT NULL;
ALTER TABLE `0_sales_orders` MODIFY `comments` tinytext;
ALTER TABLE `0_sales_orders` MODIFY `contact_email` varchar(100) default NULL;
ALTER TABLE `0_sales_orders` MODIFY `contact_phone` varchar(30) default NULL;
ALTER TABLE `0_sales_orders` MODIFY `customer_ref` tinytext NOT NULL;
ALTER TABLE `0_sales_orders` MODIFY `deliver_to` tinytext NOT NULL;
ALTER TABLE `0_sales_orders` MODIFY `delivery_address` tinytext NOT NULL;
ALTER TABLE `0_sales_orders` MODIFY `from_stk_loc` varchar(5) NOT NULL;
ALTER TABLE `0_sales_orders` MODIFY `reference` varchar(100) NOT NULL;
ALTER TABLE `0_sales_pos` MODIFY `pos_location` varchar(5) NOT NULL;
ALTER TABLE `0_sales_pos` MODIFY `pos_name` varchar(30) NOT NULL;
ALTER TABLE `0_sales_types` MODIFY `sales_type` char(50) NOT NULL;
ALTER TABLE `0_salesman` MODIFY `salesman_email` varchar(100) NOT NULL;
ALTER TABLE `0_salesman` MODIFY `salesman_fax` char(30) NOT NULL;
ALTER TABLE `0_salesman` MODIFY `salesman_name` char(60) NOT NULL;
ALTER TABLE `0_salesman` MODIFY `salesman_phone` char(30) NOT NULL;
ALTER TABLE `0_security_roles` MODIFY `areas` text;
ALTER TABLE `0_security_roles` MODIFY `description` varchar(50) default NULL;
ALTER TABLE `0_security_roles` MODIFY `role` varchar(30) NOT NULL;
ALTER TABLE `0_security_roles` MODIFY `sections` text;
ALTER TABLE `0_shippers` MODIFY `address` tinytext NOT NULL;
ALTER TABLE `0_shippers` MODIFY `contact` tinytext NOT NULL;
ALTER TABLE `0_shippers` MODIFY `phone2` varchar(30) NOT NULL;
ALTER TABLE `0_shippers` MODIFY `phone` varchar(30) NOT NULL;
ALTER TABLE `0_shippers` MODIFY `shipper_name` varchar(60) NOT NULL;
ALTER TABLE `0_sql_trail` MODIFY `msg` varchar(255) NOT NULL;
ALTER TABLE `0_sql_trail` MODIFY `sql` text NOT NULL;
ALTER TABLE `0_stock_category` MODIFY `description` varchar(60) NOT NULL;
ALTER TABLE `0_stock_category` MODIFY `dflt_adjustment_act` varchar(15) NOT NULL;
ALTER TABLE `0_stock_category` MODIFY `dflt_cogs_act` varchar(15) NOT NULL;
ALTER TABLE `0_stock_category` MODIFY `dflt_inventory_act` varchar(15) NOT NULL;
ALTER TABLE `0_stock_category` MODIFY `dflt_mb_flag` char(1) NOT NULL default 'B';
ALTER TABLE `0_stock_category` MODIFY `dflt_sales_act` varchar(15) NOT NULL;
ALTER TABLE `0_stock_category` MODIFY `dflt_units` varchar(20) NOT NULL default 'each';
ALTER TABLE `0_stock_category` MODIFY `dflt_wip_act` varchar(15) NOT NULL;
ALTER TABLE `0_stock_fa_class` MODIFY `description` varchar(200) NOT NULL;
ALTER TABLE `0_stock_fa_class` MODIFY `fa_class_id` varchar(20) NOT NULL;
ALTER TABLE `0_stock_fa_class` MODIFY `long_description` tinytext NOT NULL;
ALTER TABLE `0_stock_fa_class` MODIFY `parent_id` varchar(20) NOT NULL;
ALTER TABLE `0_stock_master` MODIFY `adjustment_account` varchar(15) NOT NULL;
ALTER TABLE `0_stock_master` MODIFY `cogs_account` varchar(15) NOT NULL;
ALTER TABLE `0_stock_master` MODIFY `depreciation_factor` double NOT NULL DEFAULT '1';
ALTER TABLE `0_stock_master` MODIFY `depreciation_method` char(1) NOT NULL DEFAULT 'S';
ALTER TABLE `0_stock_master` MODIFY `description` varchar(200) NOT NULL;
ALTER TABLE `0_stock_master` MODIFY `fa_class_id` varchar(20) NOT NULL;
ALTER TABLE `0_stock_master` MODIFY `inventory_account` varchar(15) NOT NULL;
ALTER TABLE `0_stock_master` MODIFY `long_description` tinytext NOT NULL;
ALTER TABLE `0_stock_master` MODIFY `mb_flag` char(1) NOT NULL default 'B';
ALTER TABLE `0_stock_master` MODIFY `sales_account` varchar(15) NOT NULL;
ALTER TABLE `0_stock_master` MODIFY `stock_id` varchar(20) NOT NULL;
ALTER TABLE `0_stock_master` MODIFY `units` varchar(20) NOT NULL default 'each';
ALTER TABLE `0_stock_master` MODIFY `wip_account` varchar(15) NOT NULL;
ALTER TABLE `0_stock_moves` MODIFY `loc_code` char(5) NOT NULL;
ALTER TABLE `0_stock_moves` MODIFY `reference` char(40) NOT NULL;
ALTER TABLE `0_stock_moves` MODIFY `stock_id` char(20) NOT NULL;
ALTER TABLE `0_supp_allocations` DROP INDEX `person_id`;
ALTER TABLE `0_supp_allocations` ADD UNIQUE `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`);
ALTER TABLE `0_supp_invoice_items` MODIFY `description` tinytext;
ALTER TABLE `0_supp_invoice_items` MODIFY `gl_code` varchar(15) NOT NULL;
ALTER TABLE `0_supp_invoice_items` MODIFY `memo_` tinytext;
ALTER TABLE `0_supp_invoice_items` MODIFY `stock_id` varchar(20) NOT NULL;
ALTER TABLE `0_supp_trans` MODIFY `reference` tinytext NOT NULL;
ALTER TABLE `0_supp_trans` MODIFY `supp_reference` varchar(60) NOT NULL;
ALTER TABLE `0_supp_trans` MODIFY PRIMARY KEY (`type`,`trans_no`,`supplier_id`);
ALTER TABLE `0_suppliers` MODIFY `address` tinytext NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `bank_account` varchar(60) NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `contact` varchar(60) NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `curr_code` char(3) default NULL;
ALTER TABLE `0_suppliers` MODIFY `gst_no` varchar(25) NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `notes` tinytext NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `payable_account` varchar(15) NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `payment_discount_account` varchar(15) NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `purchase_account` varchar(15) NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `supp_account_no` varchar(40) NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `supp_address` tinytext NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `supp_name` varchar(60) NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `supp_ref` varchar(30) NOT NULL;
ALTER TABLE `0_suppliers` MODIFY `website` varchar(100) NOT NULL;
ALTER TABLE `0_sys_prefs` MODIFY `category` varchar(30) default NULL;
ALTER TABLE `0_sys_prefs` MODIFY `name` varchar(35) NOT NULL;
ALTER TABLE `0_sys_prefs` MODIFY `type` varchar(20) NOT NULL;
ALTER TABLE `0_sys_prefs` MODIFY `value` TEXT NOT NULL DEFAULT '';
DROP TABLE `0_sys_types`;
ALTER TABLE `0_tag_associations` MODIFY `record_id` varchar(15) NOT NULL;
ALTER TABLE `0_tags` MODIFY `description` varchar(60) default NULL;
ALTER TABLE `0_tags` MODIFY `name` varchar(30) NOT NULL;
ALTER TABLE `0_tax_groups` MODIFY `name` varchar(60) NOT NULL;
ALTER TABLE `0_tax_types` MODIFY `name` varchar(60) NOT NULL;
ALTER TABLE `0_tax_types` MODIFY `purchasing_gl_code` varchar(15) NOT NULL;
ALTER TABLE `0_tax_types` MODIFY `sales_gl_code` varchar(15) NOT NULL;
ALTER TABLE `0_trans_tax_details` MODIFY `memo` tinytext;
ALTER TABLE `0_useronline` MODIFY `file` varchar(100) NOT NULL;
ALTER TABLE `0_useronline` MODIFY `ip` varchar(40) NOT NULL;
ALTER TABLE `0_users` MODIFY `def_print_destination` tinyint(1) NOT NULL;
ALTER TABLE `0_users` MODIFY `def_print_orientation` tinyint(1) NOT NULL;
ALTER TABLE `0_users` MODIFY `email` varchar(100) default NULL;
ALTER TABLE `0_users` MODIFY `language` varchar(20) default NULL;
ALTER TABLE `0_users` MODIFY `page_size` varchar(20) NOT NULL default 'A4';
ALTER TABLE `0_users` MODIFY `password` varchar(100) NOT NULL;
ALTER TABLE `0_users` MODIFY `phone` varchar(30) NOT NULL;
ALTER TABLE `0_users` MODIFY `print_profile` varchar(30) NOT NULL;
ALTER TABLE `0_users` MODIFY `real_name` varchar(100) NOT NULL;
ALTER TABLE `0_users` MODIFY `save_report_selections` smallint(6) NOT NULL;
ALTER TABLE `0_users` MODIFY `startup_tab` varchar(20) NOT NULL;
ALTER TABLE `0_users` MODIFY `theme` varchar(20) NOT NULL default 'default';
ALTER TABLE `0_users` MODIFY `transaction_days` smallint(6) NOT NULL default '30';
ALTER TABLE `0_users` MODIFY `use_date_picker` tinyint(1) NOT NULL default '1';
ALTER TABLE `0_users` MODIFY `user_id` varchar(60) NOT NULL;
ALTER TABLE `0_voided` MODIFY `memo_` tinytext NOT NULL;
ALTER TABLE `0_wo_issue_items` MODIFY `stock_id` varchar(40) default NULL;
ALTER TABLE `0_wo_issues` MODIFY `loc_code` varchar(5) default NULL;
ALTER TABLE `0_wo_issues` MODIFY `reference` varchar(100) default NULL;
ALTER TABLE `0_wo_manufacture` MODIFY `reference` varchar(100) default NULL;
ALTER TABLE `0_wo_requirements` MODIFY `loc_code` char(5) NOT NULL;
ALTER TABLE `0_wo_requirements` MODIFY `stock_id` char(20) NOT NULL;
ALTER TABLE `0_workcentres` MODIFY `description` char(50) NOT NULL;
ALTER TABLE `0_workcentres` MODIFY `name` char(40) NOT NULL;
ALTER TABLE `0_workorders` MODIFY `loc_code` varchar(5) NOT NULL;
ALTER TABLE `0_workorders` MODIFY `stock_id` varchar(20) NOT NULL;
ALTER TABLE `0_workorders` MODIFY `wo_ref` varchar(60) NOT NULL;
DROP TABLE `xx_reports`;
ALTER TABLE `0_cust_allocations` ADD UNIQUE `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`);
ALTER TABLE `0_cust_branch` ADD `bank_account` varchar(60) DEFAULT NULL;
ALTER TABLE `0_cust_branch` DROP `contact_name`;
ALTER TABLE `0_cust_branch` DROP `disable_trans`;
ALTER TABLE `0_cust_branch` DROP INDEX `branch_code`;
DROP TABLE `0_dashboard_reminders`;
DROP TABLE `0_dashboard_widgets`;
ALTER TABLE `0_debtor_trans` MODIFY `debtor_no` int(11) unsigned NOT NULL;
ALTER TABLE `0_debtor_trans` ADD `prep_amount` double NOT NULL DEFAULT '0';
ALTER TABLE `0_debtor_trans` ADD `tax_included` tinyint(1) unsigned NOT NULL default '0';
ALTER TABLE `0_debtor_trans` MODIFY PRIMARY KEY (`type`,`trans_no`,`debtor_no`);
ALTER TABLE `0_debtor_trans_details` ADD KEY (`src_id`);
ALTER TABLE `0_debtor_trans_details` DROP INDEX `src_id`;
ALTER TABLE `0_gl_trans` MODIFY `type_no` int(11) NOT NULL;
ALTER TABLE `0_grn_batch` ADD `rate` double NULL default '1';
DROP TABLE `0_import_paypal`;
DROP TABLE `0_import_paypal_accounts`;
ALTER TABLE `0_journal` MODIFY `currency` char(3) NOT NULL;
ALTER TABLE `0_journal` MODIFY `reference` varchar(60) NOT NULL;
ALTER TABLE `0_journal` MODIFY `source_ref` varchar(60) NOT NULL;
ALTER TABLE `0_loc_stock` MODIFY `reorder_level` double NOT NULL default '0';
ALTER TABLE `0_locations` ADD `fixed_asset` tinyint(1) NOT NULL;
DROP TABLE `0_movement_types`;
ALTER TABLE `0_purch_order_details` ADD INDEX `itemcode` (`item_code`);
ALTER TABLE `0_purch_orders` ADD `alloc` double NOT NULL DEFAULT '0';
ALTER TABLE `0_purch_orders` ADD `prep_amount` double NOT NULL DEFAULT '0';
ALTER TABLE `0_quick_entries` ADD `usage` varchar(120) NULL;
ALTER TABLE `0_quick_entry_lines` ADD `memo` tinytext NOT NULL;
ALTER TABLE `0_reflines` MODIFY `description` varchar(60) NOT NULL;
ALTER TABLE `0_reflines` MODIFY `pattern` varchar(35) NOT NULL DEFAULT '1';
ALTER TABLE `0_reflines` MODIFY `prefix` char(5) NOT NULL;
ALTER TABLE `0_reflines` DROP INDEX `prefix`, ADD UNIQUE `prefix` (`trans_type`, `prefix`);
DROP TABLE `0_requisition_details`;
DROP TABLE `0_requisitions`;
ALTER TABLE `0_sales_order_details` ADD `invoiced` double NOT NULL DEFAULT '0';
ALTER TABLE `0_sales_order_details` ADD INDEX `stkcode` (`stk_code`);
ALTER TABLE `0_sales_orders` ADD `alloc` double NOT NULL DEFAULT '0';
ALTER TABLE `0_sales_orders` ADD `prep_amount` double NOT NULL DEFAULT '0';
ALTER TABLE `0_stock_category` DROP `dflt_assembly_act`;
ALTER TABLE `0_stock_category` ADD `dflt_no_purchase` tinyint(1) NOT NULL;
ALTER TABLE `0_stock_category` ADD `dflt_wip_act` varchar(15) NOT NULL;
ALTER TABLE `0_stock_fa_class` MODIFY `description` varchar(200) NOT NULL;
ALTER TABLE `0_stock_fa_class` MODIFY `fa_class_id` varchar(20) NOT NULL;
ALTER TABLE `0_stock_fa_class` MODIFY `long_description` tinytext NOT NULL;
ALTER TABLE `0_stock_fa_class` MODIFY `parent_id` varchar(20) NOT NULL;
ALTER TABLE `0_stock_master` DROP `actual_cost`;
ALTER TABLE `0_stock_master` DROP `assembly_account`;
ALTER TABLE `0_stock_master` ADD `depreciation_date` date NOT NULL DEFAULT '0000-00-00';
ALTER TABLE `0_stock_master` ADD `depreciation_factor` double NOT NULL DEFAULT '1';
ALTER TABLE `0_stock_master` ADD `depreciation_method` char(1) NOT NULL DEFAULT 'S';
ALTER TABLE `0_stock_master` ADD `depreciation_rate` double NOT NULL DEFAULT '0';
ALTER TABLE `0_stock_master` ADD `depreciation_start` date NOT NULL DEFAULT '0000-00-00';
ALTER TABLE `0_stock_master` ADD `fa_class_id` varchar(20) NOT NULL;
ALTER TABLE `0_stock_master` DROP `last_cost`;
ALTER TABLE `0_stock_master` ADD `no_purchase` tinyint(1) NOT NULL;
ALTER TABLE `0_stock_master` ADD `purchase_cost` double NOT NULL default '0';
ALTER TABLE `0_stock_master` ADD `wip_account` varchar(15) NOT NULL;
ALTER TABLE `0_stock_moves` DROP `discount_percent`;
ALTER TABLE `0_stock_moves` DROP `person_id`;
ALTER TABLE `0_stock_moves` DROP `visible`;
ALTER TABLE `0_supp_allocations` ADD `person_id` int(11) DEFAULT NULL;
ALTER TABLE `0_supp_allocations` ADD UNIQUE `trans_type_from` (`person_id`,`trans_type_from`,`trans_no_from`,`trans_type_to`,`trans_no_to`);
ALTER TABLE `0_supp_invoice_items` ADD `dimension2_id` int(11) NOT NULL;
ALTER TABLE `0_supp_invoice_items` ADD `dimension_id` int(11) NOT NULL;
ALTER TABLE `0_supp_trans` MODIFY `supplier_id` int(11) unsigned NOT NULL;
ALTER TABLE `0_supp_trans` DROP INDEX `SupplierID_2`;
ALTER TABLE `0_supp_trans` DROP INDEX `type`;
ALTER TABLE `0_supp_trans` MODIFY PRIMARY KEY (`type`,`trans_no`,`supplier_id`);
ALTER TABLE `0_sys_prefs` MODIFY `value` TEXT NOT NULL DEFAULT '';
DROP TABLE `0_sys_types`;
ALTER TABLE `0_tax_group_items` DROP `rate`;
ALTER TABLE `0_tax_group_items` ADD `tax_shipping` tinyint(1) NOT NULL;
ALTER TABLE `0_tax_groups` DROP `tax_shipping`;
ALTER TABLE `0_trans_tax_details` ADD `reg_type` tinyint(1) default NULL;
ALTER TABLE `0_users` ADD `def_print_destination` tinyint(1) NOT NULL;
ALTER TABLE `0_users` ADD `def_print_orientation` tinyint(1) NOT NULL;
ALTER TABLE `0_users` ADD `save_report_selections` smallint(6) NOT NULL;
ALTER TABLE `0_users` ADD `transaction_days` smallint(6) NOT NULL default '30';
ALTER TABLE `0_users` ADD `use_date_picker` tinyint(1) NOT NULL default '1';
ALTER TABLE `0_wo_issue_items` ADD `unit_cost` double NOT NULL default '0';
ALTER TABLE `0_wo_requirements` DROP `std_cost`;
ALTER TABLE `0_wo_requirements` ADD `unit_cost` double NOT NULL default '0';
DROP TABLE `xx_reports`;