-if (dbdef->table('cust_main')->column('agent_custid') && ! $opt_s) {
- push @bugfix,
- "UPDATE cust_main SET agent_custid = NULL where agent_custid = ''";
-
- push @bugfix,
- "UPDATE h_cust_main SET agent_custid = NULL where agent_custid = ''"
- if (dbdef->table('h_cust_main'));
-}
-
-if ( dbdef->table('cgp_rule_condition') &&
- dbdef->table('cgp_rule_condition')->column('condition')
- )
-{
- push @bugfix,
- "ALTER TABLE ${_}cgp_rule_condition RENAME COLUMN condition TO conditionname"
- for '', 'h_';
-
-}
-
-if ( dbdef->table('areacode') and
- dbdef->table('areacode')->primary_key eq 'code' )
-{
- if ( driver_name =~ /^mysql/i ) {
- push @bugfix,
- 'ALTER TABLE areacode DROP PRIMARY KEY',
- 'ALTER TABLE areacode ADD COLUMN (areanum int auto_increment primary key)';
- }
- else {
- push @bugfix, 'ALTER TABLE areacode DROP CONSTRAINT areacode_pkey';
- }
-}
-
-if ( dbdef->table('upgrade_journal') ) {
- if ( driver_name =~ /^Pg/i ) {
- push @bugfix, "
- SELECT SETVAL( 'upgrade_journal_upgradenum_seq',
- ( SELECT MAX(upgradenum) FROM upgrade_journal )
- )
- ";
- #MySQL can't do this in a statement so have to do it manually
- #} elsif ( driver_name =~ /^mysql/i ) {
- # push @bugfix, "
- # ALTER TABLE upgrade_journal AUTO_INCREMENT =
- # ( ( SELECT MAX(upgradenum) FROM upgrade_journal ) + 1 )
- # ";
- }
-}
-