Has anyone ever have this happen to them where they did one of these raw
‘execute fk_’ sql commands in their migrations (like seen in the depot
app in the agile rails book when they were building the line item active
record…anyways, now i can’t get those foreign keys to delete, nor can
i even get the column_id to delete too…so weird…
humm…just ‘checked’ the table in phpmyadmin, reset the server, reset
mysql, dropping that coloumn_id still doesn’t work…
this is the error i get: Mysql::Error: #HY000Error on rename of
‘.\app_development#sql-644_5’ to ‘.\app_development\users’ (errno:
150): ALTER TABLE users DROP column_id
I had to do a sql operation first:
ALTER TABLE table_name DROP FOREIGN KEY fk_
Dominic S. wrote:
hi there.
Has anyone ever have this happen to them where they did one of these raw
‘execute fk_’ sql commands in their migrations (like seen in the depot
app in the agile rails book when they were building the line item active
record…anyways, now i can’t get those foreign keys to delete, nor can
i even get the column_id to delete too…so weird…
humm…just ‘checked’ the table in phpmyadmin, reset the server, reset
mysql, dropping that coloumn_id still doesn’t work…
this is the error i get: Mysql::Error: #HY000Error on rename of
‘.\app_development#sql-644_5’ to ‘.\app_development\users’ (errno:
150): ALTER TABLE users DROP column_id
this is the error i get: Mysql::Error: #HY000Error on rename of
‘.\app_development#sql-644_5’ to ‘.\app_development\users’ (errno:
150): ALTER TABLE users DROP column_id
When using foreign keys with mysql both tables have to be innodb, the
foreign key has to have an index, and both keys need to be of the same
type.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.