Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync - Mailing list pgsql-www

From Célestin Matte
Subject Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync
Date
Msg-id a5b19a46-2069-f3ec-d177-35aa46c12a8f@cmatte.me
Whole thread Raw
In response to Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync  (Célestin Matte <celestin.matte@cmatte.me>)
Responses Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync  (Magnus Hagander <magnus@hagander.net>)
List pgsql-www
>> I think the attached patch is more correct (I've backpatched it into
>> the 0001 migration because making it a separate migration makes it
>> somewhat destructive -- it's easier to just change it manually on
>> existing installs if you have one)
> 
> Thanks! Can it be pushed into the git repository, or does it need testing or something?
> 

I understand that changing id fields to AutoFields can be destructive for existing install, but on the other hand, the
currentstate of the repository is problematic as it causes pglister_sync to fail by default.
 
Another solution could be to add sequences directly in postgres using RunSQL() in a migration to turn these fields into
defacto serial fields. This is a bit hacky, but non-destructive. What do you think?
 

-- 
Célestin Matte



pgsql-www by date:

Previous
From: Célestin Matte
Date:
Subject: [PATCHES] pgarchives: merge schema.sql into Django's model
Next
From: Magnus Hagander
Date:
Subject: Re: [PATCH] pgarchives: Bugfix: missing ids in pglister_sync