watson.db.commands¶
- class watson.db.commands.Migrate(config)[source]¶
Alembic integration with Watson.
- history(rev_range)[source]¶
List changeset scripts in chronological order.
Parameters: rev_range – Revision range in format [start]:[end]
- revision(sql=False, autogenerate=False, message=None)[source]¶
Create a new revision file.
Parameters: - sql (bool) – Don’t emit SQL to database - dump to standard output instead
- autogenerate (bool) – Populate revision script with andidate migration operatons, based on comparison of database to model
- message (string) – Message string to use with ‘revision’
- stamp(sql=False, tag=None, revision='head')[source]¶
‘stamp’ the revision table with the given revision; don’t run any migrations.
Parameters: - sql (bool) – Don’t emit SQL to database - dump to standard output instead
- tag (string) – Arbitrary ‘tag’ name - can be used by custom env.py scripts
- revision (string) – Revision identifier