43 | | == Upcoming changes == |
| 43 | === Changed admin log to store primary keys as TEXT fields, not INTEGER fields === |
| 44 | |
| 45 | As of [469], the {{{object_id}}} field in {{{django.models.auth.LogEntry}}} is a {{{TextField}}} instead of an {{{IntegerField}}}. We made this change to accomodate non-integer primary keys. |
| 46 | |
| 47 | If you're using a Django database installation from before [469] and you want to use non-integer primary keys on an object you edit in the admin site, you'll need to do an {{{ALTER TABLE}}} in your database. |
| 48 | |
| 49 | In PostgreSQL: |
| 50 | |
| 51 | {{{ |
| 52 | BEGIN; |
| 53 | ALTER TABLE auth_admin_log RENAME object_id TO object_id_old; |
| 54 | ALTER TABLE auth_admin_log ADD COLUMN object_id TEXT; |
| 55 | UPDATE auth_admin_log SET object_id = object_id_old; |
| 56 | ALTER TABLE auth_admin_log DROP COLUMN object_id_old; |
| 57 | COMMIT; |
| 58 | }}} |
| 59 | |
| 60 | In MySQL: |
| 61 | |
| 62 | {{{ |
| 63 | ALTER TABLE auth_admin_log MODIFY object_id TEXT; |
| 64 | }}} |
| 65 | |
| 66 | == Possible upcoming changes == |