How do I rename a column in table xyz? The columns are:
Manufacurerid, name, status, AI, PK, int
I want to rename to manufacturerid
I tried using PHPMyAdmin panel, but I get this error:
MySQL said: Documentation
#1025 - Error on rename of…
I have a table whose primary key is used in several other tables and has several foreign keys to other tables.
CREATE TABLE location (
locationID INT NOT NULL AUTO_INCREMENT PRIMARY KEY
...
) ENGINE = InnoDB;
CREATE TABLE assignment (
…
I tried this in mysql:
mysql> alter table region drop column country_id;
And got this:
ERROR 1025 (HY000): Error on rename of './product/#sql-14ae_81' to
'./product/region' (errno: 150)
Any ideas? Foreign key stuff?
So I am trying to add a primary key to one of the tables in my database. Right now it has a primary key like this:
PRIMARY KEY (user_id, round_number)
Where user_id is a foreign key.
I am trying to change it to this:
PRIMARY KEY (user_id,…
We're trying to rename a column in MySQL (5.1.31, InnoDB) that is a foreign key to another table.
At first, we tried to use Django-South, but came up against a known issue:
http://south.aeracode.org/ticket/243
OperationalError: (1025, "Error on…
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:…
I'm using SQLAlchemy Migrate to keep track of database changes and I'm running into an issue with removing a foreign key. I have two tables, t_new is a new table, and t_exists is an existing table. I need to add t_new, then add a foreign key to…
I have a production database where I have renamed several column's that are foreign keys. Obviously mysql makes this a real pain to do in my experience.
My solution was to drop all the indexes and foreign keys, rename the id columns, and then re-add…
On my mysql DB with inno_db engine,
I have a table with a foreign key.
I want to drop the column (along with the foreign key and the associated index of course - i don't need the whole column!)
Now, simply dropping it yields an error:
General…
I've got problem with dropping foreign key index, I always get the same error
ALTER TABLE `comments` DROP INDEX `id_user`
which outputs
1025 - Error on rename of './postuj_cz1/#sql-d834_a0c704'
to './postuj_cz1/comments' (errno: 150)
The…
I have two already-existing tables which look (in part) roughly like this:
CREATE TABLE parent (
old_pk CHAR(8) NOT NULL PRIMARY KEY
) ENGINE=InnoDB;
CREATE TABLE child (
parent_key CHAR(8),
FOREIGN KEY (parent_key) REFERENCES…
I keep getting an error every time i try to drop a table called "countires" and a field called "countries".
#1025 - Error on rename of '.\mutli_page_form\survey'
to '.\mutli_page_form\#sql2-820-1fb' (errno: 152)
It says there is a FK dependency on…
I have a database already set up. I am trying to change the collation to case sensitive on my username column so it restricts login parameters to what they signed up with.
However I keep getting this: #1025 - Error on rename of…
I have a mysql database which have set of tables One table have a composite key as the primary key and and a single foreign key. Following are the table definitions.
CREATE TABLE IF NOT EXISTS `ohrm_emp_education` (
`emp_number` int(11) NOT…