Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  1. ------------------------
  2. LATEST FOREIGN KEY ERROR
  3. ------------------------
  4. 141021 13:37:01 Error in foreign key constraint of table uls/crm_ssh_session:
  5. there is no index in the table which would contain
  6. the columns as the first columns, or the data types in the
  7. table do not match the ones in the referenced table
  8. or one of the ON ... SET NULL columns is declared NOT NULL. Constraint:
  9. ,
  10. CONSTRAINT "crm_ssh_session_ibfk_1" FOREIGN KEY ("server_id") REFERENCES "crm_server" ("server_id") ON DELETE CASCADE ON UPDATE CASCADE
  11.  
  12. MySQL [uls]> select * from information_schema.referential_constraints where TABLE_NAME like '%ssh%' or REFERENCED_TABLE_NAME like '%ssh%';
  13. Empty set (0.25 sec)
  14.  
  15.  
  16. MySQL [uls]> show create table crm_ssh_session2;
  17. +------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | Table | Create Table |
  19. +------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | crm_ssh_session2 | CREATE TABLE `crm_ssh_session2` (
  21. `session_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  22. `server_id` int(11) DEFAULT NULL,
  23. `contact_id` int(11) DEFAULT NULL,
  24. `workstation_id` int(11) DEFAULT NULL,
  25. `command` mediumtext NOT NULL,
  26. `starttime` datetime NOT NULL,
  27. `endtime` datetime NOT NULL,
  28. `detected_destination` varchar(160) NOT NULL,
  29. `destuser` varchar(32) DEFAULT NULL,
  30. `desthost` varchar(128) DEFAULT NULL,
  31. `workstation` varchar(64) NOT NULL,
  32. `destip` int(10) unsigned DEFAULT NULL,
  33. PRIMARY KEY (`session_id`)
  34. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
  35. +------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36.  
  37. 141021 13:37:01 InnoDB: Error: in RENAME TABLE table `uls`.`crm_ssh_session`
  38. InnoDB: is referenced in foreign key constraints
  39. InnoDB: which are not compatible with the new table definition.
  40.  
  41.  
  42. MySQL [uls]> alter table crm_ssh_session2 rename crm_ssh_session;
  43. 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