Posts Tagged ‘Python’

PyMigrate Update

February 20th, 2009 by ScottK | No Comments | Filed in PyMigrate

I took a break yesterday afternoon to work on PyMigrate and SqlAlchemy integration. It’s kinda been hit an miss, and standing at a wall now.

I started with the easiest first, drop a table was fairly easy, just get a sqlalchemy.Table instance of the table and issue a drop command. Table drop done!

Next up was rename a table. Ok so the sqlalchemy.Table class does not support rename. Research kept coming up with sqlalchemy-migrate which supposedly has a rename. Took a moment and looked at sqlalchemy-migrate, but seemed like it was using pure sqlalchemy rename for a Table type. I got it running my creating a new table in the same structure and then inserting all the data from the old table before dropping. Sucks and this may change.

So next came the change column name for a table. Here again found that sqlalchemy didn’t have a rename. I could change the name but not save the changes. Finally broke down and installed sqlachemy-migrate.

Using the documentation I tried the rename/alter methods and found that they did not work either. No rename method on table, no alter on columns.

So I guess I’ll still use SqlAlchemy for the db connection, but I’ll have to continue to provide it with raw sql statements for the changes.

Tags: , , ,

ActiveRecord:Migration for Python

February 9th, 2009 by ScottK | No Comments | Filed in Python

I’ve made a couple of posts about how Python lacks the ability to use the Ruby on Rails like ActiveRecord:Migration and how I have come up with a way to incorporate such an idea. Well today is the 9th and I have finally released what I have.

You can find it here: http://www.techraving.com/pymigrate-activemigration-for-python/

Tags: , , ,

Python Migration Update

February 5th, 2009 by ScottK | No Comments | Filed in Python

I just wanted to give you all a quick update. I’m still trying to get the release of the multi-database adapter migration assistant out for Python frameworks out. It’s a non-technical issue for now. Hopefully resolved soon.

As I’ve offer to everyone a chance to name it still feel free to do so. Only four days left to name it!

Tags: ,