Commit Graph

6 Commits

Author SHA1 Message Date
Brian Haley c282077058 Fix pointless-string-statement pylint warning
For some reason, kilo_initial.py is triggering this warning,
so fix it by using comments instead of a docstring.

Also updated the template to use comments as well, so any
migrations created in the future use them, even though
none seem to be causing a similar warning right now.

Closes-bug: #2036763
Change-Id: I63b7ac83fdd3ebc6251979f1376daf2105489fdc
2023-09-21 10:43:46 -04:00
Slawek Kaplonski 30747a5aac Revert "Squash alchemy Liberty branch"
This reverts commit f0be5f1a83.

We broke with this reverted patch db migration for stadium
projects like neutron-vpnaas, networking-bgpvpn,
networking-bagpipe and all others which have neutron
related db migration scripts from Liberty and older releases.

Change-Id: Ib77cdf6f7cb2e975581aeb2106690d35e798dc7c
2020-09-04 07:40:44 +00:00
Rodolfo Alonso Hernandez f0be5f1a83 Squash alchemy Liberty branch
This patch squashes the DB alchemy migration from Liberty
branch. The contract and expand migration steps are added
to the initial operation files. The unneeded tables or
parameters are not created.

Now the starting migration milestone is Mitaka.

Change-Id: Ia5bd25411149d1c475c142a60814c6daa8566cae
2020-07-21 17:44:30 +00:00
Brian Haley de243a3513 Fix E402 pep8 errors
Fix E402 (module level import not at top of file) pep8 errors
and no longer ignore new failures.

Trivialfix

Change-Id: If9a202f1f322b5b03966c692e33e94b7c872079b
2018-04-20 18:13:07 +00:00
Ann fc075fa0d8 Manually add pk for alembic_version table
We hit a problem that Neutron migrations cannot be applied
on galera cluster with ENFORCING mode as alembic_version table
missing primary key on the table and it is expected that all tables
will have primary keys.

alembic_version is created and managed by Alembic and fixes for this
on Alembic side are on the review [1]. Anyway here migration is
proposed that will add pk on this table if it is missing, as in
other case we will have inconsistency between new deployments and
old ones.

[1] - https://gerrit.sqlalchemy.org/#/c/279/

Change-Id: I543a1ee286bdf11ae35adb87125d044a351a2648
Closes-bug: #1655610
2017-01-12 14:53:53 +04:00
Ann Kamyshnikova ceb9c40d66 Kilo initial migration
Juno will be deprecated with Mitaka release, so juno_initial migration
should be replaced with kilo_initilal migration in Mitaka.

Optimized execution time of "upgrade head" command.
Test on my local machine on MySQL shows about 28% reduce (from 188
seconds to 137 seconds).

Related-Bug: #1501380

Change-Id: I26571f1c43764a01d1ae9869ce43ff18ea677892
2016-01-04 16:50:09 +00:00