librelist archives

« back to archive

How do you do SQLAlchemy migration or non-SQLAlchemy DB migration?

How do you do SQLAlchemy migration or non-SQLAlchemy DB migration?

From:
Alex
Date:
2011-02-20 @ 22:15
Can you suggest any ideas how to compare two SQL DDL scripts and create
alter/delete/create SQL script keeping the current DB data?

I tried SQLAlchemy-migration and it requires to do python declaration alter
script manually that is not as solution, as I can do the same manually with
SQL DDL (what I do currently)

I looked to python SQLAlechemy solutions that can do it and was not able to
find anything like Django South or many RoR migration plugins.

Still checking for ideas how to do it, if there is no current solution,
maybe, I'll need to write some simple solution do it by my own, but still
need suggestions.

If it's not possible to automate it with current python sqlalchemy tools,
can you suggest any ideas how to compare two raw SQL DDL scripts and create
alter/delete/create SQL script keeping the current DB data?

Still checking for ideas how to do it (either related to SQLAlchemy or to
raw SQL DDL), if there is no current solution, maybe, I'll need to write
some simple solution do it by my own, but still need suggestions.

How do you do SQLAlchemy migration or non-SQLAlchemy DB migration?

Any suggestions are welcome :)

Re: [flask] How do you do SQLAlchemy migration or non-SQLAlchemy DB migration?

From:
Francisco Souza
Date:
2011-02-21 @ 02:51
>
> On Sun, Feb 20, 2011 at 7:15 PM, Alex <personxxl@gmail.com> wrote:

 Can you suggest any ideas how to compare two SQL DDL scripts and create
> alter/delete/create SQL script keeping the current DB data?
>
> [...]
>
> How do you do SQLAlchemy migration or non-SQLAlchemy DB migration?
>
Check this out: http://guilhermechapiewski.github.com/simple-db-migrate/

It is based on pure SQL (I think it works only with MySQL), so it's
language-independent.

Keep hacking,
Francisco Souza
Software developer and open source evangelist

English: http://www.franciscosouza.com
Portuguese: http://www.franciscosouza.com.br
Twitter: @franciscosouza



On Sun, Feb 20, 2011 at 7:15 PM, Alex <personxxl@gmail.com> wrote:

>  Can you suggest any ideas how to compare two SQL DDL scripts and create
> alter/delete/create SQL script keeping the current DB data?
>
> I tried SQLAlchemy-migration and it requires to do python declaration alter
> script manually that is not as solution, as I can do the same manually with
> SQL DDL (what I do currently)
>
> I looked to python SQLAlechemy solutions that can do it and was not able to
> find anything like Django South or many RoR migration plugins.
>
> Still checking for ideas how to do it, if there is no current solution,
> maybe, I'll need to write some simple solution do it by my own, but still
> need suggestions.
>
> If it's not possible to automate it with current python sqlalchemy tools,
> can you suggest any ideas how to compare two raw SQL DDL scripts and create
> alter/delete/create SQL script keeping the current DB data?
>
> Still checking for ideas how to do it (either related to SQLAlchemy or to
> raw SQL DDL), if there is no current solution, maybe, I'll need to write
> some simple solution do it by my own, but still need suggestions.
>
> How do you do SQLAlchemy migration or non-SQLAlchemy DB migration?
>
> Any suggestions are welcome :)
>

Re: [flask] How do you do SQLAlchemy migration or non-SQLAlchemy DB migration?

From:
Kenneth Reitz
Date:
2011-02-21 @ 02:57
I posed myself with the same question when i first started with flask-sqlalchemy. 

Though I haven't actually tried it yet (I do my migrations by hand for 
now), this project looks very promising: 

http://code.google.com/p/sqlalchemy-migrate/

-- 
Kenneth Reitz
http://kennethreitz.com/contact-me
On Sunday, February 20, 2011 at 9:51 PM, Francisco Souza wrote: 
>  On Sun, Feb 20, 2011 at 7:15 PM, Alex <personxxl@gmail.com> wrote:
> >  Can you suggest any ideas how to compare two SQL DDL scripts and 
create alter/delete/create SQL script keeping the current DB data?
> >  [...]
> > How do you do SQLAlchemy migration or non-SQLAlchemy DB migration?
> > 
> 
> 
> Check this out: http://guilhermechapiewski.github.com/simple-db-migrate/
> 
> It is based on pure SQL (I think it works only with MySQL), so it's 
language-independent. 
> 
> Keep hacking,
> Francisco Souza
> Software developer and open source evangelist
> 
> English: http://www.franciscosouza.com
>  Portuguese: http://www.franciscosouza.com.br
> Twitter: @franciscosouza
> 
> 
> 
> On Sun, Feb 20, 2011 at 7:15 PM, Alex <personxxl@gmail.com> wrote:
> >  Can you suggest any ideas how to compare two SQL DDL scripts and 
create alter/delete/create SQL script keeping the current DB data?
> >  I tried SQLAlchemy-migration and it requires to do python declaration
alter script manually that is not as solution, as I can do the same 
manually with SQL DDL (what I do currently)
> >  I looked to python SQLAlechemy solutions that can do it and was not 
able to find anything like Django South or many RoR migration plugins.
> >  Still checking for ideas how to do it, if there is no current 
solution, maybe, I'll need to write some simple solution do it by my own, 
but still need suggestions.
> >  If it's not possible to automate it with current python sqlalchemy 
tools, can you suggest any ideas how to compare two raw SQL DDL scripts 
and create alter/delete/create SQL script keeping the current DB data?
> >  Still checking for ideas how to do it (either related to SQLAlchemy 
or to raw SQL DDL), if there is no current solution, maybe, I'll need to 
write some simple solution do it by my own, but still need suggestions.
> > How do you do SQLAlchemy migration or non-SQLAlchemy DB migration?
> >  Any suggestions are welcome :)
> > 
> 
> 
> 
>