Re: MySQL to Postgresql schema conversion

From: "Sean Davis" <sdavis2(at)mail(dot)nih(dot)gov>
To: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: MySQL to Postgresql schema conversion
Date: 2008-09-30 17:37:19
Message-ID: 264855a00809301037t1c9ef85ah2b4b9b9a506694e3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Sep 30, 2008 at 1:18 PM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
> On Tue, Sep 30, 2008 at 12:48 PM, Sean Davis <sdavis2(at)mail(dot)nih(dot)gov> wrote:
>> On Tue, Sep 30, 2008 at 10:08 AM, Sean Davis <sdavis2(at)mail(dot)nih(dot)gov> wrote:
>>> There are a number of mysql to postgresql converters available, but
>>> many of them have significant shortcomings. Has anyone found a tool
>>> that works well? I am trying to convert a couple of relatively large,
>>> public schema to postgresql.
>>
>> I started playing with sqlalchemy (python) which can reflect a schema
>> to python objects. Those objects can then be used to instantiate
>> another schema in a different database dialect. Works like a charm
>> after modifying a couple of column names. It mirrors about 4000
>> tables in about 45 seconds (of course, without the data).
>
>
> Does it get all the various constraints and stuff (if any)? Simple
> field to field copy techniques only tends to work if the database only
> uses a small subset of common features. Great for you if it works
> though.

To the extent that the MySQL databases used anything interesting
(defaults, basically), it seems to, yes. I have used it for other
projects as an ORM and it seems to support pretty much anything I can
dream up on the postgres side for DDL.

Sean

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-09-30 17:39:51 Re: Can't cast from char to integer...
Previous Message Merlin Moncure 2008-09-30 17:18:52 Re: MySQL to Postgresql schema conversion