Changes between Version 151 and Version 152 of RemovingTheMagic


Ignore:
Timestamp:
05/30/2006 09:23:23 AM (9 years ago)
Author:
adrian
Comment:

Updated PostgreSQL migration SQL to work for Postgres 7.x

Legend:

Unmodified
Added
Removed
Modified
  • RemovingTheMagic

    v151 v152  
    186186
    187187ALTER TABLE auth_permission DROP COLUMN package;
     188
     189-- First try this:
    188190ALTER TABLE django_content_type DROP CONSTRAINT "content_types_package_fkey";
    189 ALTER TABLE django_content_type RENAME COLUMN package TO app_label;
    190 ALTER TABLE django_content_type ALTER COLUMN app_label TYPE varchar(100);
     191-- If that didn't work, do this:
     192ALTER TABLE django_content_type DROP CONSTRAINT "$1";
     193
     194ALTER TABLE django_content_type ADD COLUMN app_label varchar(100);
     195UPDATE django_content_type SET app_label=package;
     196ALTER TABLE django_content_type ALTER COLUMN app_label SET NOT NULL;
     197ALTER TABLE django_content_type DROP COLUMN package;
    191198
    192199DROP TABLE packages;
Back to Top