ce13bf6c5d
Added support for DB migration using Alembic. Modified devstack/lib/climate to sync the database during the configuration of Climate. Added the actual state of the sqlalchemy models in a migration script. This will be the first version, and will be used by devstack and the migration tests. Added a new console_script to the setup.cfg: climate-db-manage. This is the CLI is used as a wrapper of the alembic functionality. Added alembic>=0.4.1 as dependecy. Added some README with documentation about the DB migrations. Change-Id: I390ccfac1e436db0b04339e60f9f6795b22b8f7e Implements: blueprint schema-data-migration-with-alembic
25 lines
855 B
Plaintext
25 lines
855 B
Plaintext
[unit_tests]
|
|
# Set up any number of databases to test concurrently.
|
|
# The "name" used in the test is the config variable key.
|
|
|
|
# A few tests rely on one sqlite database with 'sqlite' as the key.
|
|
|
|
sqlitefile=sqlite:///test_migrations_utils.db
|
|
#mysql=mysql+mysqldb://user:pass@localhost/test_migrations_utils
|
|
#postgresql=postgresql+psycopg2://user:pass@localhost/test_migrations_utils
|
|
|
|
[migration_dbs]
|
|
# Migration DB details are listed separately as they can't be connected to
|
|
# concurrently. These databases can't be the same as above
|
|
|
|
# Note, sqlite:// is in-memory and unique each time it is spawned.
|
|
# However file sqlite's are not unique.
|
|
|
|
sqlitefile=sqlite:///test_migrations.db
|
|
#mysql=mysql+mysqldb://user:pass@localhost/test_migrations
|
|
#postgresql=postgresql+psycopg2://user:pass@localhost/test_migrations
|
|
|
|
[walk_style]
|
|
snake_walk=yes
|
|
downgrade=yes
|