MySQL Table already exists error when altering table to convert int auto
incrementing column to bigint
ERROR 1025: Error on rename of './samedaycrm4/#sql-4f4_1b5' to
'./samedaycrm4/customers' (errno: 150)
SQL Statement:
ALTER TABLE `samedaycrm4`.`customers`
CHANGE COLUMN `idcustomers` `idcustomers` BIGINT NOT NULL AUTO_INCREMENT
ERROR: Error when running failback script. Details follow.
ERROR 1050: Table 'customers' already exists
SQL Statement:
CREATE TABLE `customers` (
`idcustomers` int(11) NOT NULL AUTO_INCREMENT,
`firstname` varchar(45) DEFAULT NULL,
`lastname` varchar(45) DEFAULT NULL,
`address1` varchar(45) DEFAULT NULL,
`address2` varchar(45) DEFAULT NULL,
`city` varchar(45) DEFAULT NULL,
`state` varchar(45) DEFAULT NULL,
`zip` varchar(45) DEFAULT NULL,
`phone` varchar(45) DEFAULT NULL,
`email` varchar(45) DEFAULT NULL,
`cell` varchar(45) DEFAULT NULL,
`company` varchar(45) DEFAULT NULL,
PRIMARY KEY (`idcustomers`),
UNIQUE KEY `idcustomers_UNIQUE` (`idcustomers`)
) ENGINE=InnoDB AUTO_INCREMENT=390 DEFAULT CHARSET=latin1
I wondering if there is a way to alter the auto-incrementing primary int
key to bigint without having to create a new table. I would like to modify
the existing one.
Thanks in advance...
No comments:
Post a Comment