> Did you used to specify it in your model and then you removed it from
> the Python code without altering the database table?
Nope. I DID change the table (removed 'unique=True'), but I also
altered the db tables (syncdb, reset app, dropped tables by hand).
> Have you made any
> other alterations to the model since you created the database table? Can
> you show us the table definition that the database has created?
I changed the names of the fields in my example above for clarities
sake, but here is the actual table:
+----+--------+----------------+
| id | userID | t |
+----+--------+----------------+
| 2 | 1 | 1 |
+----+--------+----------------+
> Do you get the same error when you try this from the command line
> (manage.py shell). If so, import db.connection and have a look at the
> last entry in connection.queries. It would be interesting to see that
> the SQL we are generating is what is expected.
The (edited) SQL is:
================
CREATE TABLE `translator_translation` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`userID` integer UNSIGNED NOT NULL,
`t` integer NOT NULL UNIQUE REFERENCES `translator_translator`
(`id`)
);
CREATE UNIQUE INDEX translator_translation_translator_id ON
`translator_translation` (`translator_id`);
================
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---