| 275 | }}} |
| 276 | |
| 277 | === SQLite: Drop Auth_permission.Package column === |
| 278 | |
| 279 | '''User 'Rajesh Dhawan' notes that, in SQLite, the Foreign Key reference on column {{{package}}} from the {{{auth_permissions}}} table still causes problems after following all the above database conversions. Executing the following conversion routine eliminates the {{{package}}} column (SQLite doesn't support dropping of columns):''' |
| 280 | |
| 281 | {{{ |
| 282 | CREATE TABLE "auth_permission_new" ( |
| 283 | "id" integer NOT NULL PRIMARY KEY, |
| 284 | "name" varchar(50) NOT NULL, |
| 285 | "content_type_id" integer, |
| 286 | "codename" varchar(100) NOT NULL, |
| 287 | UNIQUE ("content_type_id", "codename") |
| 288 | ); |
| 289 | |
| 290 | |
| 291 | insert into auth_permission_new |
| 292 | (id, name, codename) |
| 293 | select id, name, codename |
| 294 | from auth_permission; |
| 295 | |
| 296 | alter table auth_permission rename to auth_permission_old; |
| 297 | alter table auth_permission_new rename to auth_permission; |
| 298 | |
| 299 | drop table auth_permission_old; |