Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------
- LATEST FOREIGN KEY ERROR
- ------------------------
- 141021 13:37:01 Error in foreign key constraint of table uls/crm_ssh_session:
- there is no index in the table which would contain
- the columns as the first columns, or the data types in the
- table do not match the ones in the referenced table
- or one of the ON ... SET NULL columns is declared NOT NULL. Constraint:
- ,
- CONSTRAINT "crm_ssh_session_ibfk_1" FOREIGN KEY ("server_id") REFERENCES "crm_server" ("server_id") ON DELETE CASCADE ON UPDATE CASCADE
- MySQL [uls]> select * from information_schema.referential_constraints where TABLE_NAME like '%ssh%' or REFERENCED_TABLE_NAME like '%ssh%';
- Empty set (0.25 sec)
- MySQL [uls]> show create table crm_ssh_session2;
- +------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | Table | Create Table |
- +------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | crm_ssh_session2 | CREATE TABLE `crm_ssh_session2` (
- `session_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `server_id` int(11) DEFAULT NULL,
- `contact_id` int(11) DEFAULT NULL,
- `workstation_id` int(11) DEFAULT NULL,
- `command` mediumtext NOT NULL,
- `starttime` datetime NOT NULL,
- `endtime` datetime NOT NULL,
- `detected_destination` varchar(160) NOT NULL,
- `destuser` varchar(32) DEFAULT NULL,
- `desthost` varchar(128) DEFAULT NULL,
- `workstation` varchar(64) NOT NULL,
- `destip` int(10) unsigned DEFAULT NULL,
- PRIMARY KEY (`session_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
- +------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- 141021 13:37:01 InnoDB: Error: in RENAME TABLE table `uls`.`crm_ssh_session`
- InnoDB: is referenced in foreign key constraints
- InnoDB: which are not compatible with the new table definition.
- MySQL [uls]> alter table crm_ssh_session2 rename crm_ssh_session;
- ERROR 1025 (HY000): Error on rename of './uls/crm_ssh_session2' to './uls/crm_ssh_session' (errno: 150)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement