Home > foreign key > error on rename of drop foreign key

Error On Rename Of Drop Foreign Key

Contents

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us rename foreign key oracle Learn more about Stack Overflow the company Business Learn more about hiring developers or

Rename Foreign Key Sql Server

posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow rename foreign key constraint oracle Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up unable to drop the foreign key up vote drop foreign key mysql 15 down vote favorite 2 I would like to drop the foreign key in my table but been into this error message mysql> alter table customers drop foreign key customerid; ERROR 1025 (HY000): Error on rename of '.\products\customers' to '.\products\#sql2-7ec-a3' (errno: 152) mysql> mysql foreign-keys foreign-key-relationship mysql-error-1025 share|improve this question edited May 17 '12 at 9:18 Fahim Parkar 15.8k2395193 asked May 17 '12 at 8:57 solomon 1171210 1

Drop Foreign Key Postgres

This may help you to understand stackoverflow.com/questions/160233/… –Imdad May 17 '12 at 9:04 @Imdad This link describes another error - (errno: 150) –Devart May 17 '12 at 9:17 Try this. Create new table (without foreign key constraint). copy the data to new table (using syntax INSERT INTO new_table SELECT * FROM old_table) Drop the old table –Imdad May 17 '12 at 9:22 Have you checked @Maksym Polshcha's answer? You have to use the foreign key's name not the column name. (it might be something like fk_customerid) –Imdad May 17 '12 at 9:24 check my answer and let me know if you still have problem... –Fahim Parkar May 17 '12 at 9:37 | show 1 more comment 4 Answers 4 active oldest votes up vote 5 down vote accepted To avoid getting this error while trying to drop a foreign key, use the constraint name rather than the column name of the foreign key. When I tried mysql> ALTER TABLE mytable DROP PRIMARY KEY; I got error as ERROR 1025 (HY000): Error on rename of '.\database\#sql-454_3' to '.\database\mytable' (errno: 150). I solved it using: mysql> ALTER TABLE mytable DROP PRIMARY KEY, ADD

Local Community Meetups Laravel.io Site and http://stackoverflow.com/questions/10632587/unable-to-drop-the-foreign-key Community Forum Database migrate:reset erring when dropping foreign key I'm having an issue when rolling back a migration that drops foreign keys. http://laravel.io/forum/03-22-2014-migratereset-erring-when-dropping-foreign-key I'm creating the foreign keys in their own migration file to avoid any issues with the tables not being present and the migration itself works fine. However, the reset provides the following SQL error. [Illuminate\Database\QueryException] SQLSTATE[HY000]: General error: 1025 Error on rename of [emailprotected]/authors_books' to [emailprotected]

 

© Copyright 2019|winbytes.org.