List:General Discussion« Previous MessageNext Message »
From:Valentin Ionescu Date:March 18 2009 6:27pm
Subject:Please help me.
View as plain text  
Hi!
My name is Valentin and I am writing to you for the following problem:
I created a database containing the table:
 
CREATE TABLE `documents_ex` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `Journal_ex_ID` int(10) unsigned DEFAULT NULL,
  `Documents_ID` int(10) unsigned DEFAULT NULL,
  `Data` datetime DEFAULT NULL,
  `Nr` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `Journal_ex_ID` (`Journal_ex_ID`,`Documents_ID`,`Data`,`Nr`),
  KEY `Documents_ID` (`Documents_ID`),
  CONSTRAINT `documents_ex_ibfk_1` FOREIGN KEY (`Journal_ex_ID`) REFERENCES
`journal_ex` (`ID`) ON DELETE CASCADE,
  CONSTRAINT `documents_ex_ibfk_2` FOREIGN KEY (`Documents_ID`) REFERENCES
`documents` (`ID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1
 
After some time I decided to drop 'Journal_ex_ID' column and all its environment from
this non empty table.
All I tried to do like:
 
alter table documents_ex drop column Journal_ex_ID
or
alter table documents_ex drop foreign key  Journal_ex_ID
or 
alter table documents_ex drop  key  Journal_ex_ID
 
 I receive the same error 150 and I don't know what to do.
 
Please help me.
 Best regards.


      
Thread
Please help me.Valentin Ionescu18 Mar