kmmbvnr / sarasvati

Automatically exported from code.google.com/p/sarasvati
0 stars 5 forks source link

Error in creating Foreign Key #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Execute ALTER TABLE wf_process
  ADD CONSTRAINT FK_process_parent
    FOREIGN KEY (parent_token_id)
      REFERENCES wf_node_token;
2. All other database scripts executed successfully except for the above. Also 
there is no parent_token_id reference in wf_node_token table.
3. Please help with correct statement.

What is the expected output? What do you see instead?
ERROR 1005 (HY000): Can't create table 'workflow.#sql-1518_75' (errno: 150)

Please use labels and text to provide additional information.
Using MySQL 5.5 on Windows XP Pro.

Original issue reported on code.google.com by veny...@yahoo.com on 24 Jan 2013 at 8:12

GoogleCodeExporter commented 9 years ago
alter table wf_process
add constraint FK_process_parent
foreign key (parent_token_id) references wf_node_token(id);

The reference is (id) which was missing in Saravathi 1.4. The above statement 
is from 2.0.1.

This issue can be closed. Thanks.

Original comment by veny...@yahoo.com on 25 Jan 2013 at 3:22

GoogleCodeExporter commented 9 years ago
Just got a chance to look at this today. Thank you for the clarification. 
Closing as requested.

Original comment by plor...@gmail.com on 27 Jan 2013 at 5:39