2009/4/23 Jonathan Vanasco jonat...@findmeon.com
here's what i do:
- I always and only use table reflection
- I have a table called 'appschema' that is roughly in pg:
- in my app i have a toplevel dir called 'sql-migrations' that just
has this structure
component/id-desc.sql
- the last
On Apr 27, 2:38 pm, Max Ischenko ische...@gmail.com wrote:
We do roughly the same, the only small difference is that we UPDATE
appschema instead of doing INSERT. But INSERT seems a better idea since it
leaves a trail of past db updates.
And of course the code checks appschema and refuses to
Folks, thanks for the responses, very helpful.
I'm going to take a good look at sqlalchemy-migrate, as that seems to
be exactly what I need to do.
Tom - thanks for your link, I'll work my way through it this week, and
let you have any feedback. First pass, it looks just right.
All the best,
Hi Folks,
I'm developing an application using pylons, which involves a bit of
database schema modifying from time to time. Can anyone tell me how
to action changes on the database (managed by sqlalchemy)?
Some things that I've already figured out:
- setting up the initial database is done
On Wed, Apr 22, 2009 at 12:36:09AM -0700, Richard Jones wrote:
I'm developing an application using pylons, which involves a bit of
database schema modifying from time to time. Can anyone tell me how
to action changes on the database (managed by sqlalchemy)?
I think SQLAlchemy Migrate is the
On Wed, Apr 22, 2009 at 12:36:09AM -0700, Richard Jones wrote:
Is there a way to access the database directly, so that I can manually
re-jig the database. Or do I have to provide an update script each
time i change the schema? (and if so, how?)
I have a very low-tech solution. I never use
Previously Ross Vandegrift wrote:
On Wed, Apr 22, 2009 at 12:36:09AM -0700, Richard Jones wrote:
Is there a way to access the database directly, so that I can manually
re-jig the database. Or do I have to provide an update script each
time i change the schema? (and if so, how?)
I
here's what i do:
- I always and only use table reflection
- I have a table called 'appschema' that is roughly in pg:
create table app_schema (
id serial,
component varchar(32),
schema_version int,
timestamp_install timestamp
);
create unique index app_schema_uidx on app_schema(
I use SQLAlchemy Migrate. It's an overhead, but has saved me several
times from having to write a lot of SQL to move my data from one
schema to another.
I have an article on SQLAlchemy Migrate here:
http://truefalsemaybe.com/2008/09/sqlalchemy-migrations/
Let me know what you think.
Cheers,