Archive for the ‘PyMigrate’ Category


 

PyMigrate 1.0 Stable Release

March 7th, 2009 by ScottK | No Comments | Filed in PyMigrate

I’ve released the first stable version of PyMigrate today. This release actually detaches all the database API’s to SqlAlchemy. So you will need SqlAlchemy and the associated eggs for your database per SqlAlchemy.

You can find the downloadable versions here online casinoPyMigrate Downloads and the svn repo backgammon free casino money free craps game play free black jack craps video poker strategy play black jack online how to win video poker casino game online uk best casino online casino secure online gambling jackpot casino online casino black jack learn to play craps how to win at video poker craps online blackjack casino game online casino betting free on line video poker casino games no download casino online gambling casino play free casino slots video poker machine bonus video poker free on line slots double bonus video poker free video poker games free casinos roulette online craps rules free on line casino rules of craps online casino free money blackjack 21 internet casino how to play craps free casino game download fortunelounge online casino free casino download free casino card game free roulette game free casino play no deposit free money casino internet casino online here. The supported database API’s (for now) are:

Mysql
Sqlite
Oracle
DB2
Postgres
Oracle
MSSQL

While SqlAlchemy may lack some things, such as dropping an index, the PyMigrate app accomplishes this through a straight sql statement. Granted some of the databases do not support some actions, such as rename colum in Sqlite.

PyMigrate helps all of us quickly change up/down our databases, but I know from a dba stand point that we need “total” control of a few things. So I made the Sql block read multiple lines, instead of one line. That gives you absolute control of your database migration as you need, and still allows you to revert it as needed.

So PyMigrate offers common modifications to tables/indexes/colums, etc. Using the sql: block will the most control you can have.

I’m happy to release this version and will soon be adding more database API’s. Feel free to comment!


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: , , ,