| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Move the public API out of oslo.db to oslo_db. Retain the ability to
import from the old namespace package for backwards compatibility for
this release cycle.
Blueprint: drop-namespace-packages
Change-Id: Ie96b482b9fbcb1d85203ad35bb65c1f43e912a44
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tests in tests/sqlalchemy/test_migrations.py which expect
to see changes in unique constraints fail due to the
assumption that the "include_object" feature of Alembic only
deals with the 'table' and 'column' constructs. As Alembic
0.7.0 has added include_object support for 'index' and
'unique_constraint', this method should not be limiting
itself to not include objects that it's testing for.
Tests won't pass on Alembic 0.7.0 without this patch.
Change-Id: Ia71446bb8c0b248c6310534deb290524e3946987
|
|
|
|
|
|
|
| |
Add method that checks that foreign keys in models are synchonized
with foreign keys that are created in database.
Change-Id: I4a776da0f53a79218ed4b111cac33b37d264fa1b
|
|
|
|
|
|
|
|
|
|
|
|
| |
If Column which type is Enum has server_default it is compared
incorrectly for PostgreSQL.
For example, Column('test', sa.Enum('one', 'two', name='enum'),
server_default='one').
In model it has DefaultClause('one', for_update=False)) alembic
finds it different from server variant "'one'::enum".
Change-Id: Id30858f9c4c7a2bfb7f9313d47930845fe354a70
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rename _walk_versions(), _migrate_up(), _migrate_down()
and mark them deprecated as they will be removed in few
releases. These functions will be the part of public API
as this class will be used for migrations in other
OpenStack projects, so there is no need to make them
'private'.
Change-Id: Ic9358445e60a0dd43a5900e8bda7b12f2bebf679
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test showed an error with alembic 0.6.6:
For MySQL Integer server_default value is compared incorrectly.
For example, when model has DefaultClause('0', for_update=False)
alembic finds it different from server variant "'0'".
For PostgreSQL Sting server_default value is compared incorrectly.
For example, when model has DefaultClause('', for_update=False)
alembic finds it different from server variant "''::character varying".
Such error appear in implementation of ModelsMigrationsSync to Neutron
https://review.openstack.org/76520.
Change-Id: I9730da1c0790a88f81570c51c36cc0cbe0651a5a
|
|
|
|
|
|
|
| |
Fixes indentations to pass E128 check.
Removes E128 from ignore setting in tox.ini.
Change-Id: I92ca574c076b4bd26e424a3b404188601264b5de
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrations should be tested with real database backends. For this goal
intended number of base test cases which used in current implementation.
Previously there were two ways to run migration tests: using
opportunistic test cases (default way we've been using on CI) and
by using database connection strings, specified in test_migrations.conf,
for every particular database test case. For the sake of simplicity and
consistency we are moving to using of opportunistic db test cases here.
With this change we are free from locking, so we don't need `lockfile`
anymore.
Closes-Bug: #1327397
Closes-Bug: #1328997
Change-Id: I92b1dcd830c4755f429a0f6529911e607c2c7de7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a base test case that allows to check if the DB schema obtained
by applying of migration scripts is equal to the one produced from
models definitions. It's very important that those two stay in sync
to be able to use models definitions for generation of the initial
DB schema. Though, due to the using of sqlalchemy-migrate (since we
had to write migration scripts manually and alembic can generate
them automatically) we have many divergences in projects right now,
which must be detected and fixed.
Fortunately, we can now rely on alembic + sqlalchemy implementation
of schema comparison instead of writing our own tools.
Blueprint: sync-models-with-migrations
Change-Id: I2d2c35987426dacb1f566569d23a80eee3575a58
|
|
- add missed requirements
- add required modules from openstack.common
- added entry points to setup.cfg
- fixed tests location
- fixed incorrect common modules imports
|