Questions tagged [mysql-error-1091]

6 questions
10
votes
3 answers

MySQL (InnoDB): need to delete column, and accompanying foreign key constraint and index

Here's my table: CREATE TABLE `alums_alumphoto` ( `id` int(11) NOT NULL auto_increment, `alum_id` int(11) NOT NULL, `photo_id` int(11) default NULL, `media_id` int(11) default NULL, `updated` datetime NOT NULL, PRIMARY KEY …
nmjk
  • 749
  • 3
  • 9
  • 25
4
votes
1 answer

Can't DROP "MUL" key/index in MySQL - column listed in SHOW

I'm using mysql-server-5.0.45-7.el5 on CentOs 5. In my database, there is a table which, I don't know when, a MUL key was created (the database is shared, under control of a group), and now when I try to insert some values I get an error like shown…
Etore Marcari Jr.
  • 572
  • 2
  • 10
  • 19
2
votes
2 answers

Error with South when migrating changes to model

I have added a foreign key to a user to a model, but when I try to migrate the database using South, I get the following error: _mysql_exceptions.OperationalError: (1067, "Invalid default value for 'user_id'") South tells me that I may be able to…
Kelp
  • 1,268
  • 5
  • 18
  • 32
2
votes
2 answers

Duplicate column name error after aborting alter

I created a Rails database migration to add a new column to a table in my database, but after I noticed it was taking much longer than expected (15 minutes plus), I manually killed the ruby process running the migration. Then I realized that the…
jrdioko
  • 32,230
  • 28
  • 81
  • 120
2
votes
3 answers

drop index with a comma in the name

I have a table (well there are a bunch of them) with an index that contains a comma .... FULLTEXT KEY `description` (`description`), FULLTEXT KEY `description,title` (`description`,`title`), -- <-- HERE FULLTEXT KEY `content` (`content`), …
dogmatic69
  • 7,574
  • 4
  • 31
  • 49
0
votes
1 answer

MySQL: ALTER IGNORE TABLE with DROP INDEX

I have many databases and in each I have table names. In some I have UNIQUE KEY named name1 and in others the same UNIQUE KEY is named name2. I want to standard this name so I prepared 3 queries to run on each database: ALTER IGNORE TABLE `names` …
kuba
  • 3,670
  • 3
  • 31
  • 41