sqlalchemy migrate command
Project description
tgmigrate is an turbogears command extension which provide sqlalchemy migrate support.
The first version of tgmigrate gives turbogears developers a quick evaluation if sqlalchemy migrate is helpful for us.
Install
easy_install tgmigrate
Usage
After install, tgmigrate plug an “migrate” command into tg-admin console utility.
The basic syntax is
tg-admin migrate [command]
tgmigrate takes care the dburi and repository name for you.
The reference procedure is:
quickstart project as usual:
$ tg-admin quickstart -i -s demo
setup sqlalchemy dburi in demo/dev.cfg
create initial database
$ tg-admin sql create
create repository “migration”
$ tg-admin migrate create
note the default repository folder named “migration” is created in your project folder.
move your database to version control
$ tg-admin migrate version_control
or briefly:
$ tg-admin migrate vc
Now you could watch the current version in both database and repository
show repository version:
$ tg-admin migrate v (tg-admin migrate version)
show database version:
$ tg-admin migrate dbv (tg-admin migrate db_version)
then follow the migration doc http://erosson.com/migrate/docs/versioning.html to do the further stuff.
I must confess that at this time I havn’t go through the further stuff in the doc,
so if you found sqlalchemy migrate is helpful, please let me know.
(say something back to TurboGears google group http://groups.google.com/group/turbogears)
reference
Available commands are
$ tg-admin migrate [command]
command = [ ‘help’, ‘create’, ‘script’, ‘commit’, ‘version’, ‘source’, ‘version_control’, ‘db_version’, ‘upgrade’, ‘downgrade’, ‘drop_version_control’, ‘manage’, ‘test’]
Caution
It’s an evaluation build, the project propose is giving turbogears developers a quick evaluation for sqlalchemy migrate function, It’s no harm for you, but no further support is guaranteed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file tgmigrate-0.1-py2.4.egg
.
File metadata
- Download URL: tgmigrate-0.1-py2.4.egg
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8137199dc897a0d034e875ab8df2935fae81b4db4d90bee0946f126f9a896471 |
|
MD5 | 3bd8212e5a29c01b9e9251f14bd53b08 |
|
BLAKE2b-256 | 9919589550db595ac981bb6e07bce9ba7c6e4e1c26d5041818b149e386219ca6 |