I've put together a quick script to fixup sequences in PostgreSQL. It seems 
to work fine.

psql -t ${DB} -c "SELECT E'select setval(\'' || c.relname || E'\',  (select 
max(id)+1 from ' || replace(c.relname, '_id_seq', '') || '), false);' FROM 
pg_class c WHERE c.relkind = 'S';" | psql ${DB}

dave
<><

On Thursday, April 25, 2013 8:56:41 AM UTC-5, David Lee wrote:
>
>
>
> On Wednesday, April 24, 2013 3:05:05 PM UTC-5, Christian Hammond wrote:
>>
>> Hi David,
>>
>> How did you attempt the migration? Converting raw SQL, or using the 
>> dumpdb/loaddb management commands?
>>
>
> dumpdb/loaddb.
>
> Here's the process we're using:
>
> root@old-machine# rb-site manage /var/www/reviewboard dumpdb > dumpdb.json
> root@old-machine# scp dumpdb.json new-machine:
>
> root@new-machine# rb-site install /var/www/reviewboard
> root@new-machine# rb-site manage /var/www/reviewboard syncdb
> root@new-machine# rb-site manage /var/www/reviewboard dbshell
> > TRUNCATE django_content_type CASCADE
> > TRUNCATE scmtools_tool CASCADE
> root@new-machine# rb-site manage /var/www/reviewboard loaddb dumpdb.json
>  
>
>> Migrating from MySQL to PostgreSQL is not something I've ever tried. I 
>> know some people have had success going from sqlite to MySQL using 
>> dumpdb/loaddb.
>>
>> Christian
>>
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to