)]}'
{"alembic.ini":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"7fb7b8da3d5b5bb8e7ab08ac0b9b362ea3e2e798","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[alembic]"},{"line_number":2,"context_line":"# path to migration scripts"},{"line_number":3,"context_line":"script_location \u003d migration"},{"line_number":4,"context_line":""}],"source_content_type":"text/x-properties","patch_set":4,"id":"1ae5cdf2_3373ee4f","line":1,"updated":"2014-06-23 14:51:42.000000000","message":"why would we need this file (it\u0027s per migration repo, so the consuming projects will provide configs)?","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"354d428a7320e293006d5f476014b18e3ab7d6a1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[alembic]"},{"line_number":2,"context_line":"# path to migration scripts"},{"line_number":3,"context_line":"script_location \u003d migration"},{"line_number":4,"context_line":""}],"source_content_type":"text/x-properties","patch_set":4,"id":"1ae5cdf2_b6bc47dd","line":1,"in_reply_to":"1ae5cdf2_3373ee4f","updated":"2014-06-23 17:02:29.000000000","message":"I made this file because it is required for testing. Tests for this feature will fail without this file. If we should delete it, how to solve this situation?","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"21a82cdf6e3dc2db08df58040814db761020489f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[alembic]"},{"line_number":2,"context_line":"# path to migration scripts"},{"line_number":3,"context_line":"script_location \u003d migration"},{"line_number":4,"context_line":""}],"source_content_type":"text/x-properties","patch_set":13,"id":"baada198_8c062ccd","line":1,"updated":"2014-07-02 09:54:42.000000000","message":"I don\u0027t think we need to provide alembic.ini here. This is a task of consuming projects.","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"269d11a94ebeee6e7226e9afc4c20d455f4e38b8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[alembic]"},{"line_number":2,"context_line":"# path to migration scripts"},{"line_number":3,"context_line":"script_location \u003d migration"},{"line_number":4,"context_line":""}],"source_content_type":"text/x-properties","patch_set":13,"id":"baada198_c887f45f","line":1,"in_reply_to":"baada198_8c062ccd","updated":"2014-07-18 12:45:21.000000000","message":"Now we have a template for this file. We can\u0027t do without a template because we must generate this files for testing. And the templates can be used by other projects.","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"}],"migration/env.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"7fb7b8da3d5b5bb8e7ab08ac0b9b362ea3e2e798","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"#    a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_53707a40","line":1,"updated":"2014-06-23 14:51:42.000000000","message":"ditto","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"354d428a7320e293006d5f476014b18e3ab7d6a1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"#    a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_d66ab3ec","line":1,"in_reply_to":"1ae5cdf2_53707a40","updated":"2014-06-23 17:02:29.000000000","message":"Do you mean it shouldn\u0027t be there at all? The tests couldn\u0027t be started without this file too. Same question, how to design the feature to be able to test it without these files?","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"66d7275889f8e49403c34fde3bfff2a476433cf8","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    engine_facade \u003d session.EngineFacade("},{"line_number":48,"context_line":"        \u0027mysql://openstack_citest:openstack_citest@localhost/openstack_citest\u0027)"},{"line_number":49,"context_line":"    engine \u003d engine_facade.get_engine()"},{"line_number":50,"context_line":"    with engine.connect() as connection:"},{"line_number":51,"context_line":"        context.configure(connection\u003dconnection,"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_38d25934","line":48,"updated":"2014-06-26 17:17:34.000000000","message":"can you tell me about the URL here?  is this a placeholder of some kind?","commit_id":"dff64a2d547023514c983ab04f822ababb4fc0ba"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"2297d0c250f40b5fc5afae060892498c7fd0f951","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    engine_facade \u003d session.EngineFacade("},{"line_number":48,"context_line":"        \u0027mysql://openstack_citest:openstack_citest@localhost/openstack_citest\u0027)"},{"line_number":49,"context_line":"    engine \u003d engine_facade.get_engine()"},{"line_number":50,"context_line":"    with engine.connect() as connection:"},{"line_number":51,"context_line":"        context.configure(connection\u003dconnection,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_2b8e7f79","line":48,"in_reply_to":"1ae5cdf2_38d25934","updated":"2014-07-04 16:01:48.000000000","message":"This is an url of CI standard mysql database, we have the same one for postgresql. In this particular place it is \"workable placeholder\". This patch is in WIP status, so \"just to not fall\" staff can be met. In the real world it will be such as this: \n\n    os.getenv(\u0027OS_TEST_DBAPI_CONNECTION\u0027, \u0027sqlite://\u0027)","commit_id":"dff64a2d547023514c983ab04f822ababb4fc0ba"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"dc466e6c750f327536291c3e158449033c5e0173","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    engine_facade \u003d session.EngineFacade("},{"line_number":48,"context_line":"        \u0027mysql://openstack_citest:openstack_citest@localhost/openstack_citest\u0027)"},{"line_number":49,"context_line":"    engine \u003d engine_facade.get_engine()"},{"line_number":50,"context_line":"    with engine.connect() as connection:"},{"line_number":51,"context_line":"        context.configure(connection\u003dconnection,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_7fac8e8c","line":48,"in_reply_to":"baada198_2b8e7f79","updated":"2014-07-18 12:38:00.000000000","message":"Done","commit_id":"dff64a2d547023514c983ab04f822ababb4fc0ba"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"21a82cdf6e3dc2db08df58040814db761020489f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from logging import config as log_config"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from alembic import context"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_6c4ab8ad","line":12,"updated":"2014-07-02 09:54:42.000000000","message":"In case you missed our chat with Mike yesterday: http://paste.openstack.org/show/85307/\n\nSo having common env.py in oslo.db might make sense, but:\n\n1. We should find a better place for it within the tree.\n\n2. We should not bind an engine to a hard-coded db url here.\n\n3. We (probably) should not call fileConfig() here as it breaks existing logging configuration the app might have set up.\n\n4. We should make it possible for a consuming projects to pass a MetaData instance used in its models.","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"269d11a94ebeee6e7226e9afc4c20d455f4e38b8","unresolved":false,"context_lines":[{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from logging import config as log_config"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from alembic import context"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_48da0479","line":12,"in_reply_to":"baada198_6c4ab8ad","updated":"2014-07-18 12:45:21.000000000","message":"It is simple template now.","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"21a82cdf6e3dc2db08df58040814db761020489f","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    engine_facade \u003d session.EngineFacade("},{"line_number":48,"context_line":"        \u0027mysql://openstack_citest:openstack_citest@localhost/openstack_citest\u0027)"},{"line_number":49,"context_line":"    engine \u003d engine_facade.get_engine()"},{"line_number":50,"context_line":"    with engine.connect() as connection:"},{"line_number":51,"context_line":"        context.configure(connection\u003dconnection,"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_0c693cbe","line":48,"updated":"2014-07-02 09:54:42.000000000","message":"We shouldn\u0027t be using openstack_citest db here, but rather make it possible for a user of test migration mixin to pass an engine/connection instance. E.g. when used together with opportunistic test cases we\u0027d like to pass DBs created on demand here.","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"269d11a94ebeee6e7226e9afc4c20d455f4e38b8","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    engine_facade \u003d session.EngineFacade("},{"line_number":48,"context_line":"        \u0027mysql://openstack_citest:openstack_citest@localhost/openstack_citest\u0027)"},{"line_number":49,"context_line":"    engine \u003d engine_facade.get_engine()"},{"line_number":50,"context_line":"    with engine.connect() as connection:"},{"line_number":51,"context_line":"        context.configure(connection\u003dconnection,"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_08cc8cba","line":48,"in_reply_to":"baada198_0c693cbe","updated":"2014-07-18 12:45:21.000000000","message":"Done","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"}],"oslo/db/exception.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"ca3cd323768b6473cc2592113674d9033f61a885","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    migration script."},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def __init__(self, message\u003dNone):"},{"line_number":156,"context_line":"        super(InitialMigrationDowngrade, self).__init__(message)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"baada198_0d7a30f0","line":155,"updated":"2014-08-06 16:02:42.000000000","message":"why do we need this method if all it does is calling of a corresponding superclass method?","commit_id":"23fd031f2cd09d5b16a529b44c780d2584c7952f"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"b996912065230b2c87eacc795250e23cfa77d08a","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    migration script."},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def __init__(self, message\u003dNone):"},{"line_number":156,"context_line":"        super(InitialMigrationDowngrade, self).__init__(message)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"baada198_ac84c9b2","line":155,"in_reply_to":"baada198_0d7a30f0","updated":"2014-08-07 08:30:37.000000000","message":"Done","commit_id":"23fd031f2cd09d5b16a529b44c780d2584c7952f"},{"author":{"_account_id":10391,"name":"Ihor Kalnytskyi","email":"ihor@kalnytskyi.com","username":"ikalnitsky"},"change_message_id":"a21b1d84595e41dd37cdbbb503aeeaf5d9f83be7","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        super(DbMigrationError, self).__init__(message)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"class InitialMigrationDowngrade(DBError):"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    \"\"\"Indicates absence of downgrade scenario at initial migration."},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"baada198_b2d09bc9","line":148,"updated":"2014-08-07 11:21:24.000000000","message":"It\u0027s not obvious what\u0027s wrong if we catch this exception: invalid, absence or something else.\n\nSo I\u0027d prefer to rename it into something like \"NoDowngradeScenario\".\n\nBTW, you introduced this exception, catch it, but don\u0027t raise it around the code. So it\u0027s useless I believe.","commit_id":"115154a9d6c1ae8fe3a9d8e25376e987f28ef5a0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"21d60c129c668e4eaa7183d5f2cf290eac2dc6ce","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        super(DbMigrationError, self).__init__(message)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"class InitialMigrationDowngrade(DBError):"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    \"\"\"Indicates absence of downgrade scenario at initial migration."},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"baada198_c8d80283","line":148,"in_reply_to":"baada198_b2d09bc9","updated":"2014-08-07 13:04:49.000000000","message":"It is raised in https://review.openstack.org/#/c/111984/2/ironic/db/sqlalchemy/alembic/versions/2581ebaf0cb2_initial_migration.py . oslo.db does not raise migration specific exception because there is no migration scripts in oslo.db. But this behavior is tested https://review.openstack.org/#/c/99965/33/tests/sqlalchemy/test_migrations.py +384, this is the only way to use this exception in oslo.db.\n\nI\u0027m not avoid to rename it, but let\u0027s discuss it first. Initial migrations are scenarios used with clean database state. So it can\u0027t have downgrade scenario by definition. It seems to me obvious. I\u0027d rather add to the name Error word.","commit_id":"115154a9d6c1ae8fe3a9d8e25376e987f28ef5a0"},{"author":{"_account_id":10391,"name":"Ihor Kalnytskyi","email":"ihor@kalnytskyi.com","username":"ikalnitsky"},"change_message_id":"a21b1d84595e41dd37cdbbb503aeeaf5d9f83be7","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"class InitialMigrationDowngrade(DBError):"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    \"\"\"Indicates absence of downgrade scenario at initial migration."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    Should be used in a not implemented `downgrade` function of an initial"}],"source_content_type":"text/x-python","patch_set":33,"id":"baada198_d2fd0f3e","line":149,"updated":"2014-08-07 11:21:24.000000000","message":"Please, remove an empty line between class declaration and doctring.","commit_id":"115154a9d6c1ae8fe3a9d8e25376e987f28ef5a0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"21d60c129c668e4eaa7183d5f2cf290eac2dc6ce","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"class InitialMigrationDowngrade(DBError):"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    \"\"\"Indicates absence of downgrade scenario at initial migration."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    Should be used in a not implemented `downgrade` function of an initial"}],"source_content_type":"text/x-python","patch_set":33,"id":"baada198_a8dcae46","line":149,"in_reply_to":"baada198_d2fd0f3e","updated":"2014-08-07 13:04:49.000000000","message":"My PyLint thinks it is wrong style. Most of other existed docstrings are done with a blank line above. Unfortunately it is done by me, so this is not valid argument. \nQuote from pep 257:\n\nthe docstring needs to be offset from the first method by a blank line; for symmetry, put a blank line between the class header and the docstring.\n\nPlease see http://legacy.python.org/dev/peps/pep-0257/#multi-line-docstrings\n\nThis is not common style for OpenStack, so if you insist, I\u0027ll do it.","commit_id":"115154a9d6c1ae8fe3a9d8e25376e987f28ef5a0"}],"oslo/db/sqlalchemy/alembic_template/openstack/alembic.ini.mako":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"71436eec21fcaef7125a88532627793492f04b15","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# A generic, single database configuration."},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"[alembic]"},{"line_number":4,"context_line":"# path to migration scripts"}],"source_content_type":"application/octet-stream","patch_set":27,"id":"baada198_f85b3120","line":1,"updated":"2014-07-22 08:31:04.000000000","message":"Not sure why we need this file here","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"73e05289dc3006af6180fb7e4196c7aba23fcf2d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# A generic, single database configuration."},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"[alembic]"},{"line_number":4,"context_line":"# path to migration scripts"}],"source_content_type":"application/octet-stream","patch_set":27,"id":"baada198_e78f0ccc","line":1,"in_reply_to":"baada198_f85b3120","updated":"2014-07-22 09:51:54.000000000","message":"We need custom env.py to keep existing logging intact. We should have simple OpenStack Alembic template to create temporary alembic environment. We can\u0027t avoid creation of this file and create env.py. Logically Alembic environment can\u0027t be a part of Oslo.db, because there is no migrations provided. This template can be useful for other projects.","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"0081cb13c5ea827bc1359cb87a4a71d0fe98804d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# A generic, single database configuration."},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"[alembic]"},{"line_number":4,"context_line":"# path to migration scripts"},{"line_number":5,"context_line":"script_location \u003d /tmp/alembic"},{"line_number":6,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":28,"id":"baada198_94b82013","line":3,"updated":"2014-07-22 16:13:10.000000000","message":"so also in here, probably no sqlalchemy.uri, and script_location has to be done differently.  It can do setuptools package paths, for example. \n\nMy +1 would be on an entirely wrapped command line tool for alembic that is openstack specific, and bypasses alembic.ini totally.","commit_id":"c1dc0aa62010d8a8e646f176de92cede521c21d3"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"ca517a86b114e9c0b753e632fdc184431c7d442f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# A generic, single database configuration."},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"[alembic]"},{"line_number":4,"context_line":"# path to migration scripts"},{"line_number":5,"context_line":"script_location \u003d /tmp/alembic"},{"line_number":6,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":28,"id":"baada198_2a4c28c9","line":3,"in_reply_to":"baada198_751ed1bc","updated":"2014-07-30 16:06:47.000000000","message":"We are good. Done.","commit_id":"c1dc0aa62010d8a8e646f176de92cede521c21d3"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"ada9e958872b6b925379d12fab2c06c90f8be546","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# A generic, single database configuration."},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"[alembic]"},{"line_number":4,"context_line":"# path to migration scripts"},{"line_number":5,"context_line":"script_location \u003d /tmp/alembic"},{"line_number":6,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":28,"id":"baada198_751ed1bc","line":3,"in_reply_to":"baada198_94b82013","updated":"2014-07-24 11:44:36.000000000","message":"\u003e\u003e\u003e so also in here, probably no sqlalchemy.uri\n\nDone\n\n\u003e\u003e\u003e script_location has to be done differently. It can do setuptools package paths, for example.\n\nPlease describe it, what is the relationship between this file and setuptools? How should looks the path and why?\n\n\u003e\u003e\u003e My +1 would be on an entirely wrapped command line tool for alembic that is openstack specific, and bypasses alembic.ini totally.\n\nShould we make our simpler analog of alembic.command? It is difficult to bypass .ini file using alembic.command, because of an init function expects for it.","commit_id":"c1dc0aa62010d8a8e646f176de92cede521c21d3"}],"oslo/db/sqlalchemy/alembic_template/openstack/env.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"71436eec21fcaef7125a88532627793492f04b15","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 Mirantis.inc"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_b86b7985","line":1,"updated":"2014-07-22 08:31:04.000000000","message":"Common env.py on the hand might make sense, but we need to do a research on how to make it reusable in consuming projects.","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"73e05289dc3006af6180fb7e4196c7aba23fcf2d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 Mirantis.inc"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_a77354e7","line":1,"in_reply_to":"baada198_b86b7985","updated":"2014-07-22 09:51:54.000000000","message":"Do you know, what do we need from this common file?","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"0081cb13c5ea827bc1359cb87a4a71d0fe98804d","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# this is the Alembic Config object, which provides"},{"line_number":25,"context_line":"# access to the values within the .ini file in use."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"config \u003d context.config"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# add your model\u0027s MetaData object here"},{"line_number":30,"context_line":"# for \u0027autogenerate\u0027 support"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_76dab31e","line":27,"updated":"2014-07-22 16:13:10.000000000","message":"so why don\u0027t we go with the whole oslo.config.CONF approach here?  that\u0027s the config system we\u0027re using.  env.py should be integrated as much as possible into the oslo system.","commit_id":"c1dc0aa62010d8a8e646f176de92cede521c21d3"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"ada9e958872b6b925379d12fab2c06c90f8be546","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# this is the Alembic Config object, which provides"},{"line_number":25,"context_line":"# access to the values within the .ini file in use."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"config \u003d context.config"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# add your model\u0027s MetaData object here"},{"line_number":30,"context_line":"# for \u0027autogenerate\u0027 support"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_f56bc1ee","line":27,"in_reply_to":"baada198_76dab31e","updated":"2014-07-24 11:44:36.000000000","message":"I have tried to implement oslo.config here. There is a bit of problems within this way.\n\n* alembic.config and oslo.config have a different interfaces.\n* alembic uses config in entire functions, with the point above that is an issue.\n\nI\u0027ll keep my research.","commit_id":"c1dc0aa62010d8a8e646f176de92cede521c21d3"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"ca517a86b114e9c0b753e632fdc184431c7d442f","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# this is the Alembic Config object, which provides"},{"line_number":25,"context_line":"# access to the values within the .ini file in use."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"config \u003d context.config"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# add your model\u0027s MetaData object here"},{"line_number":30,"context_line":"# for \u0027autogenerate\u0027 support"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_0a2204ba","line":27,"in_reply_to":"baada198_f56bc1ee","updated":"2014-07-30 16:06:47.000000000","message":"Alembic config stays here, because if we want to implement oslo.config here, we must implement it inside of Alembic. It seems to me like an overhead. Every argumentative objections are welcome.","commit_id":"c1dc0aa62010d8a8e646f176de92cede521c21d3"}],"oslo/db/sqlalchemy/test_migrations.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"7fb7b8da3d5b5bb8e7ab08ac0b9b362ea3e2e798","unresolved":false,"context_lines":[{"line_number":159,"context_line":"class AlembicPoweredWalkVersions(object):"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    PATH_TO_INI \u003d abc.abstractproperty(lambda: None)"},{"line_number":162,"context_line":"    \"\"\"`migrate.versioning.repository.Repository` subclass. Allows basic"},{"line_number":163,"context_line":"    manipulation with migration repository."},{"line_number":164,"context_line":"    \"\"\""},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_93b842c9","line":162,"updated":"2014-06-23 14:51:42.000000000","message":"forgot to update the comment?","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"354d428a7320e293006d5f476014b18e3ab7d6a1","unresolved":false,"context_lines":[{"line_number":159,"context_line":"class AlembicPoweredWalkVersions(object):"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    PATH_TO_INI \u003d abc.abstractproperty(lambda: None)"},{"line_number":162,"context_line":"    \"\"\"`migrate.versioning.repository.Repository` subclass. Allows basic"},{"line_number":163,"context_line":"    manipulation with migration repository."},{"line_number":164,"context_line":"    \"\"\""},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_969e6b68","line":162,"in_reply_to":"1ae5cdf2_93b842c9","updated":"2014-06-23 17:02:29.000000000","message":"Yep.","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"486fbde016e71318d8fbc570c5614f520d2c2a6c","unresolved":false,"context_lines":[{"line_number":159,"context_line":"class AlembicPoweredWalkVersions(object):"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    PATH_TO_INI \u003d abc.abstractproperty(lambda: None)"},{"line_number":162,"context_line":"    \"\"\"`migrate.versioning.repository.Repository` subclass. Allows basic"},{"line_number":163,"context_line":"    manipulation with migration repository."},{"line_number":164,"context_line":"    \"\"\""},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_570a067a","line":162,"in_reply_to":"1ae5cdf2_969e6b68","updated":"2014-06-24 08:28:46.000000000","message":"Done","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"7fb7b8da3d5b5bb8e7ab08ac0b9b362ea3e2e798","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.buf \u003d io.StringIO()"},{"line_number":169,"context_line":"        self.config \u003d config.Config(self.PATH_TO_INI, stdout\u003dself.buf)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _revisions_list(self):"},{"line_number":172,"context_line":"        command.history(self.config)"},{"line_number":173,"context_line":"        revisions \u003d re.findall("},{"line_number":174,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_f61c1417","line":171,"updated":"2014-06-23 14:51:42.000000000","message":"names of these two methods are confusing: it\u0027s not clear to me why list() returns all the revision pairs and range() only the first and the last one","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"486fbde016e71318d8fbc570c5614f520d2c2a6c","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.buf \u003d io.StringIO()"},{"line_number":169,"context_line":"        self.config \u003d config.Config(self.PATH_TO_INI, stdout\u003dself.buf)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _revisions_list(self):"},{"line_number":172,"context_line":"        command.history(self.config)"},{"line_number":173,"context_line":"        revisions \u003d re.findall("},{"line_number":174,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_770f0289","line":171,"in_reply_to":"1ae5cdf2_d609d385","updated":"2014-06-24 08:28:46.000000000","message":"Done","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"354d428a7320e293006d5f476014b18e3ab7d6a1","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.buf \u003d io.StringIO()"},{"line_number":169,"context_line":"        self.config \u003d config.Config(self.PATH_TO_INI, stdout\u003dself.buf)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _revisions_list(self):"},{"line_number":172,"context_line":"        command.history(self.config)"},{"line_number":173,"context_line":"        revisions \u003d re.findall("},{"line_number":174,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_d609d385","line":171,"in_reply_to":"1ae5cdf2_f61c1417","updated":"2014-06-23 17:02:29.000000000","message":"I agree with you about list, but range returns really range from first to last revision, in the format appropriate to alembic commands implementation.","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"bd71db7ddefdbd8e2ce6892db971b9c535868194","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        except IndexError:"},{"line_number":185,"context_line":"            raise exc.DbMigrationError(\u0027There is no suitable migrations.\u0027)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def _walk_versions(self, downgrade\u003dFalse, snake_walk\u003dFalse):"},{"line_number":188,"context_line":"        if snake_walk:"},{"line_number":189,"context_line":"            revisions \u003d self._revisions_list()"},{"line_number":190,"context_line":"            for revision, parent in revisions:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_d69b9864","line":187,"updated":"2014-06-23 14:54:45.000000000","message":"this changes the semantics of the original class by making snake_walk and downgrade mutually exclusive","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"486fbde016e71318d8fbc570c5614f520d2c2a6c","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        except IndexError:"},{"line_number":185,"context_line":"            raise exc.DbMigrationError(\u0027There is no suitable migrations.\u0027)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def _walk_versions(self, downgrade\u003dFalse, snake_walk\u003dFalse):"},{"line_number":188,"context_line":"        if snake_walk:"},{"line_number":189,"context_line":"            revisions \u003d self._revisions_list()"},{"line_number":190,"context_line":"            for revision, parent in revisions:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_17107eaa","line":187,"in_reply_to":"1ae5cdf2_d69b9864","updated":"2014-06-24 08:28:46.000000000","message":"Done","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"7fb7b8da3d5b5bb8e7ab08ac0b9b362ea3e2e798","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            for revision, parent in revisions:"},{"line_number":191,"context_line":"                self._migrate_up(revision)"},{"line_number":192,"context_line":"                if parent !\u003d \u0027None\u0027:"},{"line_number":193,"context_line":"                    self._migrate_down(\u0027:\u0027.join([revision, parent]))"},{"line_number":194,"context_line":"        else:"},{"line_number":195,"context_line":"            self._migrate_up(self._revisions_range())"},{"line_number":196,"context_line":"            if downgrade:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_962e7041","line":193,"updated":"2014-06-23 14:51:42.000000000","message":"_migrate_up() is missing","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"486fbde016e71318d8fbc570c5614f520d2c2a6c","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            for revision, parent in revisions:"},{"line_number":191,"context_line":"                self._migrate_up(revision)"},{"line_number":192,"context_line":"                if parent !\u003d \u0027None\u0027:"},{"line_number":193,"context_line":"                    self._migrate_down(\u0027:\u0027.join([revision, parent]))"},{"line_number":194,"context_line":"        else:"},{"line_number":195,"context_line":"            self._migrate_up(self._revisions_range())"},{"line_number":196,"context_line":"            if downgrade:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_37157a9b","line":193,"in_reply_to":"1ae5cdf2_962e7041","updated":"2014-06-24 08:28:46.000000000","message":"Done","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"e0e1146364d2dd355068641b8351512d5259eb39","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import io"},{"line_number":19,"context_line":"import logging"},{"line_number":20,"context_line":"import re"},{"line_number":21,"context_line":"import six"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from alembic import command"},{"line_number":24,"context_line":"from alembic import config"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_80709874","line":21,"updated":"2014-06-25 09:42:06.000000000","message":"nit: this should be in the second imports group","commit_id":"9e1b1d35e3c21fd2a3bf5f7aac61809cc467c7e5"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"22a3ef2145230163ffe85f3682c2e29a598b487f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import io"},{"line_number":19,"context_line":"import logging"},{"line_number":20,"context_line":"import re"},{"line_number":21,"context_line":"import six"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from alembic import command"},{"line_number":24,"context_line":"from alembic import config"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_8c91a5f3","line":21,"in_reply_to":"1ae5cdf2_80709874","updated":"2014-06-25 15:54:43.000000000","message":"Done","commit_id":"9e1b1d35e3c21fd2a3bf5f7aac61809cc467c7e5"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"e0e1146364d2dd355068641b8351512d5259eb39","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        self.buf \u003d io.StringIO()"},{"line_number":168,"context_line":"        self.config \u003d config.Config(self.PATH_TO_INI, stdout\u003dself.buf)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def _revisions(self, downgrade\u003dFalse):"},{"line_number":171,"context_line":"        command.history(self.config)"},{"line_number":172,"context_line":"        revisions \u003d re.findall("},{"line_number":173,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_003648b4","line":170,"updated":"2014-06-25 09:42:06.000000000","message":"please add a description for this method. Also it seems to be untested","commit_id":"9e1b1d35e3c21fd2a3bf5f7aac61809cc467c7e5"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"22a3ef2145230163ffe85f3682c2e29a598b487f","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        self.buf \u003d io.StringIO()"},{"line_number":168,"context_line":"        self.config \u003d config.Config(self.PATH_TO_INI, stdout\u003dself.buf)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def _revisions(self, downgrade\u003dFalse):"},{"line_number":171,"context_line":"        command.history(self.config)"},{"line_number":172,"context_line":"        revisions \u003d re.findall("},{"line_number":173,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_cfce3fb7","line":170,"in_reply_to":"1ae5cdf2_003648b4","updated":"2014-06-25 15:54:43.000000000","message":"Done","commit_id":"9e1b1d35e3c21fd2a3bf5f7aac61809cc467c7e5"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"e0e1146364d2dd355068641b8351512d5259eb39","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            revisions.reverse()"},{"line_number":176,"context_line":"        return revisions"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def _revisions_range(self, downgrade\u003dFalse):"},{"line_number":179,"context_line":"        revisions \u003d self._revisions(downgrade)"},{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            return \u0027:\u0027.join([revisions[0][0], revisions[-1][0]])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_80497834","line":178,"updated":"2014-06-25 09:42:06.000000000","message":"ditto","commit_id":"9e1b1d35e3c21fd2a3bf5f7aac61809cc467c7e5"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"22a3ef2145230163ffe85f3682c2e29a598b487f","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            revisions.reverse()"},{"line_number":176,"context_line":"        return revisions"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def _revisions_range(self, downgrade\u003dFalse):"},{"line_number":179,"context_line":"        revisions \u003d self._revisions(downgrade)"},{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            return \u0027:\u0027.join([revisions[0][0], revisions[-1][0]])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_efd13b57","line":178,"in_reply_to":"1ae5cdf2_80497834","updated":"2014-06-25 15:54:43.000000000","message":"Done","commit_id":"9e1b1d35e3c21fd2a3bf5f7aac61809cc467c7e5"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"b5e97049d4ce5216883fe9a352b73c5f21fe5f6b","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":160,"context_line":"class AlembicPoweredWalkVersions(object):"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    PATH_TO_INI \u003d abc.abstractproperty(lambda: None)"},{"line_number":163,"context_line":"    \"\"\"Path to Alembic .ini config file.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_95509d5f","line":160,"updated":"2014-06-26 14:55:59.000000000","message":"Missing docs. Should be documented what is `_pre`, `_post`, `_check` methods expected behavior.","commit_id":"07975d4abe92c17cb5471a8e9e182236e0d590f8"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"99d779fdb6600d3278098ce0028f10bb3cf9032f","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                        \u0027:\u0027.join([parent, revision]), with_data\u003dTrue)"},{"line_number":200,"context_line":"        else:"},{"line_number":201,"context_line":"            revisions \u003d self._revisions_range()"},{"line_number":202,"context_line":"            self._migrate_up(revisions, with_data\u003dTrue)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        if downgrade:"},{"line_number":205,"context_line":"            if snake_walk:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_e6fea105","line":202,"updated":"2014-06-26 12:50:06.000000000","message":"Every migration should be checked. If all the migrations applied in one step, to check is every migration applied successfully is impossible.\nTODO: step by step apply every revision and check it with data.","commit_id":"07975d4abe92c17cb5471a8e9e182236e0d590f8"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"99d779fdb6600d3278098ce0028f10bb3cf9032f","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"            else:"},{"line_number":215,"context_line":"                revisions \u003d self._revisions_range(downgrade)"},{"line_number":216,"context_line":"                self._migrate_down(revisions, with_data\u003dTrue)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def _migrate_down(self, version, with_data\u003dFalse):"},{"line_number":219,"context_line":"        command.downgrade(self.config, version, sql\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_89124e56","line":216,"updated":"2014-06-26 12:50:06.000000000","message":"ditto","commit_id":"07975d4abe92c17cb5471a8e9e182236e0d590f8"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"f9c8fbecd217a87f61ce6a32a8a39e3dfba6b746","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        if with_data:"},{"line_number":222,"context_line":"            post_downgrade \u003d getattr("},{"line_number":223,"context_line":"                self, \"_post_downgrade_%s\" % version.split(\u0027:\u0027)[1], None)"},{"line_number":224,"context_line":"            if post_downgrade:"},{"line_number":225,"context_line":"                post_downgrade(self.engine)"},{"line_number":226,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_12a108f7","line":223,"updated":"2014-06-26 12:05:19.000000000","message":"Not tested, never called.","commit_id":"07975d4abe92c17cb5471a8e9e182236e0d590f8"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"f9c8fbecd217a87f61ce6a32a8a39e3dfba6b746","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        if with_data:"},{"line_number":231,"context_line":"            data \u003d None"},{"line_number":232,"context_line":"            pre_upgrade \u003d getattr("},{"line_number":233,"context_line":"                self, \"_pre_upgrade_%s\" % version, None)"},{"line_number":234,"context_line":"            if pre_upgrade:"},{"line_number":235,"context_line":"                data \u003d pre_upgrade(self.engine)"},{"line_number":236,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_b2b13446","line":233,"updated":"2014-06-26 12:05:19.000000000","message":"ditto","commit_id":"07975d4abe92c17cb5471a8e9e182236e0d590f8"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"f9c8fbecd217a87f61ce6a32a8a39e3dfba6b746","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        command.upgrade(self.config, version, sql\u003dTrue)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        if with_data:"},{"line_number":240,"context_line":"            check \u003d getattr(self, \"_check_%s\" % version, None)"},{"line_number":241,"context_line":"            if check and data:"},{"line_number":242,"context_line":"                check(self.engine, data)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ae5cdf2_72924ca0","line":240,"updated":"2014-06-26 12:05:19.000000000","message":"ditto","commit_id":"07975d4abe92c17cb5471a8e9e182236e0d590f8"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"66d7275889f8e49403c34fde3bfff2a476433cf8","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        revision."},{"line_number":180,"context_line":"        \"\"\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        command.history(self.config)"},{"line_number":183,"context_line":"        revisions \u003d re.findall("},{"line_number":184,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_581645a8","line":182,"updated":"2014-06-26 17:17:34.000000000","message":"do we have interest in calling into Alembic APIs more directly here, skipping command and the need to grab stdout?  Most of what\u0027s needed should be public.","commit_id":"dff64a2d547023514c983ab04f822ababb4fc0ba"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"2297d0c250f40b5fc5afae060892498c7fd0f951","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        revision."},{"line_number":180,"context_line":"        \"\"\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        command.history(self.config)"},{"line_number":183,"context_line":"        revisions \u003d re.findall("},{"line_number":184,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_eb21e74d","line":182,"in_reply_to":"1ae5cdf2_581645a8","updated":"2014-07-04 16:01:48.000000000","message":"If I correctly understood you, we should use API rather than commands. Am I right?","commit_id":"dff64a2d547023514c983ab04f822ababb4fc0ba"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"dc466e6c750f327536291c3e158449033c5e0173","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        revision."},{"line_number":180,"context_line":"        \"\"\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        command.history(self.config)"},{"line_number":183,"context_line":"        revisions \u003d re.findall("},{"line_number":184,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_4522edb9","line":182,"in_reply_to":"baada198_eb21e74d","updated":"2014-07-18 12:38:00.000000000","message":"Done","commit_id":"dff64a2d547023514c983ab04f822ababb4fc0ba"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"66d7275889f8e49403c34fde3bfff2a476433cf8","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        `_check_\u003crevision\u003e`: Check applied changes for correctness. Check"},{"line_number":257,"context_line":"        is required tables existing, insert test data (provided by"},{"line_number":258,"context_line":"        _pre_upgrade_*) from database, select data from database, and so"},{"line_number":259,"context_line":"        on."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        :param version: range from an actual revision id to a previous revision"},{"line_number":262,"context_line":"        in format `\u003crevision\u003e:\u003cparent\u003e`."}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_d8fdf53c","line":259,"updated":"2014-06-26 17:17:34.000000000","message":"OK if we are checking against the database, why are the commands run as sql\u003dTrue, which places the SQL into the stdout buffer?","commit_id":"dff64a2d547023514c983ab04f822ababb4fc0ba"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"2297d0c250f40b5fc5afae060892498c7fd0f951","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        `_check_\u003crevision\u003e`: Check applied changes for correctness. Check"},{"line_number":257,"context_line":"        is required tables existing, insert test data (provided by"},{"line_number":258,"context_line":"        _pre_upgrade_*) from database, select data from database, and so"},{"line_number":259,"context_line":"        on."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        :param version: range from an actual revision id to a previous revision"},{"line_number":262,"context_line":"        in format `\u003crevision\u003e:\u003cparent\u003e`."}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_ebcf277d","line":259,"in_reply_to":"1ae5cdf2_d8fdf53c","updated":"2014-07-04 16:01:48.000000000","message":"This is mistake. It wasn\u0027t clear to me what does this option do. I\u0027ll fix.","commit_id":"dff64a2d547023514c983ab04f822ababb4fc0ba"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"dc466e6c750f327536291c3e158449033c5e0173","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        `_check_\u003crevision\u003e`: Check applied changes for correctness. Check"},{"line_number":257,"context_line":"        is required tables existing, insert test data (provided by"},{"line_number":258,"context_line":"        _pre_upgrade_*) from database, select data from database, and so"},{"line_number":259,"context_line":"        on."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        :param version: range from an actual revision id to a previous revision"},{"line_number":262,"context_line":"        in format `\u003crevision\u003e:\u003cparent\u003e`."}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_39d93257","line":259,"in_reply_to":"baada198_ebcf277d","updated":"2014-07-18 12:38:00.000000000","message":"Done","commit_id":"dff64a2d547023514c983ab04f822ababb4fc0ba"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"53a8c95fce865dc1a75741fcb5ec587e92b190d8","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        revision."},{"line_number":180,"context_line":"        \"\"\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        command.history(self.config)"},{"line_number":183,"context_line":"        revisions \u003d re.findall("},{"line_number":184,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"dab895d6_056235d8","line":182,"updated":"2014-06-29 18:49:12.000000000","message":"lines 182-\u003e185 can be replaced with:\n\n    from alembic.script import ScriptDirectory # in the imports above\n    script \u003d ScriptDirectory.from_config(config)\n    revisions \u003d [\n        (rev.revision, rev.down_revision)\n        for rev in script.walk_revisions(\"base\", \"head\")\n    ]\n\notherwise command.history turns everything into a string and the re.findall() turns it back, better to hit the data-level API directly.  it\u0027s public.","commit_id":"10aabaa2c04d9a2df125d1664fe29134c167cb53"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9bbf1997985c4fcbd875b5d856c18a0827a57d91","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        revision."},{"line_number":180,"context_line":"        \"\"\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        command.history(self.config)"},{"line_number":183,"context_line":"        revisions \u003d re.findall("},{"line_number":184,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_c295cc33","line":182,"in_reply_to":"dab895d6_056235d8","updated":"2014-07-07 08:32:18.000000000","message":"Thanks! I I\u0027m going to start to fix it all today.","commit_id":"10aabaa2c04d9a2df125d1664fe29134c167cb53"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"53a8c95fce865dc1a75741fcb5ec587e92b190d8","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            if pre_upgrade:"},{"line_number":273,"context_line":"                data \u003d pre_upgrade(self.engine)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        command.upgrade(self.config, version, sql\u003dTrue)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        if with_data:"},{"line_number":278,"context_line":"            check \u003d getattr(self, \"_check_%s\" % version, None)"}],"source_content_type":"text/x-python","patch_set":12,"id":"dab895d6_a52509ad","line":275,"updated":"2014-06-29 18:49:12.000000000","message":"sorry, I\u0027m still not getting this part.  sql\u003dTrue means the SQL will go into self.buf, it isn\u0027t emitted against the DB.  The checks I\u0027ve seen in nova for example with _check_123() etc. are checking the actual database for columns present and such.  I know I must be missing something here but I\u0027m not getting it.","commit_id":"10aabaa2c04d9a2df125d1664fe29134c167cb53"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9bbf1997985c4fcbd875b5d856c18a0827a57d91","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            if pre_upgrade:"},{"line_number":273,"context_line":"                data \u003d pre_upgrade(self.engine)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        command.upgrade(self.config, version, sql\u003dTrue)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        if with_data:"},{"line_number":278,"context_line":"            check \u003d getattr(self, \"_check_%s\" % version, None)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_222928e6","line":275,"in_reply_to":"dab895d6_a52509ad","updated":"2014-07-07 08:32:18.000000000","message":"Yes I know about this flaw, but I had no time to fix it last several days. This patch has new patch sets without any changes because it is in chain with 93424. Chain patches should be pushed together because it could be difficult to rebase next time it it was pushed apart. So I\u0027ll fix it.","commit_id":"10aabaa2c04d9a2df125d1664fe29134c167cb53"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"21a82cdf6e3dc2db08df58040814db761020489f","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        revision."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        command.history(self.config)"},{"line_number":186,"context_line":"        revisions \u003d re.findall("},{"line_number":187,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_6c51d8d7","line":185,"updated":"2014-07-02 09:54:42.000000000","message":"repeating Mike\u0027s comment here:\n\nlines 182-\u003e185 can be replaced with:\n    from alembic.script import ScriptDirectory # in the imports above\n    script \u003d ScriptDirectory.from_config(config)\n    revisions \u003d [\n        (rev.revision, rev.down_revision)\n        for rev in script.walk_revisions(\"base\", \"head\")\n    ]\n\notherwise command.history turns everything into a string and the re.findall() turns it back, better to hit the data-level API directly. it\u0027s public.","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"269d11a94ebeee6e7226e9afc4c20d455f4e38b8","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        revision."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        command.history(self.config)"},{"line_number":186,"context_line":"        revisions \u003d re.findall("},{"line_number":187,"context_line":"            \u0027\\w*Rev: (\\w+)\\s+\\w*Parent: (\\w+)\\s+\u0027, self.buf.getvalue())"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_88b7bc20","line":185,"in_reply_to":"baada198_6c51d8d7","updated":"2014-07-18 12:45:21.000000000","message":"Done","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"21a82cdf6e3dc2db08df58040814db761020489f","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        :type with_data: Bool"},{"line_number":239,"context_line":"        \"\"\""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        command.downgrade(self.config, version, sql\u003dTrue)"},{"line_number":242,"context_line":"        if with_data:"},{"line_number":243,"context_line":"            post_downgrade \u003d getattr("},{"line_number":244,"context_line":"                self, \"_post_downgrade_%s\" % version.split(\u0027:\u0027)[1], None)"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_eca968e0","line":241,"updated":"2014-07-02 09:54:42.000000000","message":"You must have missed Mike\u0027s comments to one of the previous patch sets on using of sql\u003dTrue here: migrations won\u0027t be performed against the database (SQL statements will go into self.buf), which is not what we want to test here.","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"269d11a94ebeee6e7226e9afc4c20d455f4e38b8","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        :type with_data: Bool"},{"line_number":239,"context_line":"        \"\"\""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        command.downgrade(self.config, version, sql\u003dTrue)"},{"line_number":242,"context_line":"        if with_data:"},{"line_number":243,"context_line":"            post_downgrade \u003d getattr("},{"line_number":244,"context_line":"                self, \"_post_downgrade_%s\" % version.split(\u0027:\u0027)[1], None)"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_685188d8","line":241,"in_reply_to":"baada198_eca968e0","updated":"2014-07-18 12:45:21.000000000","message":"Done","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"eebfe600601d99db3393fd405032803438091442","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        :type with_data: Bool"},{"line_number":239,"context_line":"        \"\"\""},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        command.downgrade(self.config, version, sql\u003dTrue)"},{"line_number":242,"context_line":"        if with_data:"},{"line_number":243,"context_line":"            post_downgrade \u003d getattr("},{"line_number":244,"context_line":"                self, \"_post_downgrade_%s\" % version.split(\u0027:\u0027)[1], None)"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_6a4abc56","line":241,"in_reply_to":"baada198_eca968e0","updated":"2014-07-09 12:11:43.000000000","message":"I saw Mike\u0027s comments. I had no time to implement all the fixes and uploaded this patch just to save dependency history with previous patch. Anyway I got that \"rebase\" button solve my pain. I\u0027m sorry that I confused you and Mike and I hope I\u0027ll have workable version of the patch set. Till I\u0027m in this fixes.","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"21a82cdf6e3dc2db08df58040814db761020489f","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            if pre_upgrade:"},{"line_number":276,"context_line":"                data \u003d pre_upgrade(self.engine)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        command.upgrade(self.config, version, sql\u003dTrue)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        if with_data:"},{"line_number":281,"context_line":"            check \u003d getattr(self, \"_check_%s\" % version, None)"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_eccec8b3","line":278,"updated":"2014-07-02 09:54:42.000000000","message":"ditto","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"269d11a94ebeee6e7226e9afc4c20d455f4e38b8","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            if pre_upgrade:"},{"line_number":276,"context_line":"                data \u003d pre_upgrade(self.engine)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        command.upgrade(self.config, version, sql\u003dTrue)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        if with_data:"},{"line_number":281,"context_line":"            check \u003d getattr(self, \"_check_%s\" % version, None)"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_e854b8c7","line":278,"in_reply_to":"baada198_eccec8b3","updated":"2014-07-18 12:45:21.000000000","message":"Done","commit_id":"9a802b58313ceba2b5a5de41a6515013388e551c"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"71436eec21fcaef7125a88532627793492f04b15","unresolved":false,"context_lines":[{"line_number":405,"context_line":"    def setUp(self):"},{"line_number":406,"context_line":"        super(AlembicPoweredWalkVersions, self).setUp()"},{"line_number":407,"context_line":"        self.config \u003d config.Config(self.PATH_TO_INI)"},{"line_number":408,"context_line":"        self.config.set_main_option(\u0027sqlalchemy.url\u0027,"},{"line_number":409,"context_line":"                                    six.text_type(self.engine.url))"},{"line_number":410,"context_line":"        self.script_dir \u003d script.ScriptDirectory.from_config(self.config)"},{"line_number":411,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_4ace062e","line":408,"updated":"2014-07-22 08:31:04.000000000","message":"This will only work with the env.py module you\u0027ve provided, while projects like Neutron or Ironic have a different one - they will take the db url value from the oslo.config.cfg.CONF.","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"73e05289dc3006af6180fb7e4196c7aba23fcf2d","unresolved":false,"context_lines":[{"line_number":405,"context_line":"    def setUp(self):"},{"line_number":406,"context_line":"        super(AlembicPoweredWalkVersions, self).setUp()"},{"line_number":407,"context_line":"        self.config \u003d config.Config(self.PATH_TO_INI)"},{"line_number":408,"context_line":"        self.config.set_main_option(\u0027sqlalchemy.url\u0027,"},{"line_number":409,"context_line":"                                    six.text_type(self.engine.url))"},{"line_number":410,"context_line":"        self.script_dir \u003d script.ScriptDirectory.from_config(self.config)"},{"line_number":411,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_125c3c19","line":408,"in_reply_to":"baada198_4ace062e","updated":"2014-07-22 09:51:54.000000000","message":"Yes, that is right. I believe we should prepare Neutron and Alembic to use our approach, not adjust to existing env.pys of the projects.","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"71436eec21fcaef7125a88532627793492f04b15","unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":"        try:"},{"line_number":483,"context_line":"            with env.EnvironmentContext(self.config, self.script_dir,"},{"line_number":484,"context_line":"                fn\u003dlambda *args: self.script_dir._downgrade_revs(dest, curr)):"},{"line_number":485,"context_line":"                self.script_dir.run_env()"},{"line_number":486,"context_line":"        except NotImplementedError:"},{"line_number":487,"context_line":"            utils.drop_schema(self.engine)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_d8ed8df2","line":484,"updated":"2014-07-22 08:31:04.000000000","message":"nit: lambda changing the state of other objects looks weird for people coming from functional languages","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"73e05289dc3006af6180fb7e4196c7aba23fcf2d","unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":"        try:"},{"line_number":483,"context_line":"            with env.EnvironmentContext(self.config, self.script_dir,"},{"line_number":484,"context_line":"                fn\u003dlambda *args: self.script_dir._downgrade_revs(dest, curr)):"},{"line_number":485,"context_line":"                self.script_dir.run_env()"},{"line_number":486,"context_line":"        except NotImplementedError:"},{"line_number":487,"context_line":"            utils.drop_schema(self.engine)"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_9243ec12","line":484,"in_reply_to":"baada198_d8ed8df2","updated":"2014-07-22 09:51:54.000000000","message":"So, it is not true for Python, it is just one-line unnamed function — exactly what  we need here. If it is confusing, I\u0027ll comment it.","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"71436eec21fcaef7125a88532627793492f04b15","unresolved":false,"context_lines":[{"line_number":483,"context_line":"            with env.EnvironmentContext(self.config, self.script_dir,"},{"line_number":484,"context_line":"                fn\u003dlambda *args: self.script_dir._downgrade_revs(dest, curr)):"},{"line_number":485,"context_line":"                self.script_dir.run_env()"},{"line_number":486,"context_line":"        except NotImplementedError:"},{"line_number":487,"context_line":"            utils.drop_schema(self.engine)"},{"line_number":488,"context_line":"        finally:"},{"line_number":489,"context_line":"            # NOTE(I159):Use dest for _post_downgrade_### name interpolation if"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_0a640e20","line":486,"updated":"2014-07-22 08:31:04.000000000","message":"Could you please elaborate on when NotImplementedError is raised and we don\u0027t fail the test in that case?","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"73e05289dc3006af6180fb7e4196c7aba23fcf2d","unresolved":false,"context_lines":[{"line_number":483,"context_line":"            with env.EnvironmentContext(self.config, self.script_dir,"},{"line_number":484,"context_line":"                fn\u003dlambda *args: self.script_dir._downgrade_revs(dest, curr)):"},{"line_number":485,"context_line":"                self.script_dir.run_env()"},{"line_number":486,"context_line":"        except NotImplementedError:"},{"line_number":487,"context_line":"            utils.drop_schema(self.engine)"},{"line_number":488,"context_line":"        finally:"},{"line_number":489,"context_line":"            # NOTE(I159):Use dest for _post_downgrade_### name interpolation if"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_f2ed08f2","line":486,"in_reply_to":"baada198_0a640e20","updated":"2014-07-22 09:51:54.000000000","message":"Yes, this is thin place. I have an approach in my mind, probably not too clean, but useful.","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"71436eec21fcaef7125a88532627793492f04b15","unresolved":false,"context_lines":[{"line_number":484,"context_line":"                fn\u003dlambda *args: self.script_dir._downgrade_revs(dest, curr)):"},{"line_number":485,"context_line":"                self.script_dir.run_env()"},{"line_number":486,"context_line":"        except NotImplementedError:"},{"line_number":487,"context_line":"            utils.drop_schema(self.engine)"},{"line_number":488,"context_line":"        finally:"},{"line_number":489,"context_line":"            # NOTE(I159):Use dest for _post_downgrade_### name interpolation if"},{"line_number":490,"context_line":"            # we downgrade an initial migration."}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_ea78bac2","line":487,"updated":"2014-07-22 08:31:04.000000000","message":"Not sure why we only call drop_schema() here","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"73e05289dc3006af6180fb7e4196c7aba23fcf2d","unresolved":false,"context_lines":[{"line_number":484,"context_line":"                fn\u003dlambda *args: self.script_dir._downgrade_revs(dest, curr)):"},{"line_number":485,"context_line":"                self.script_dir.run_env()"},{"line_number":486,"context_line":"        except NotImplementedError:"},{"line_number":487,"context_line":"            utils.drop_schema(self.engine)"},{"line_number":488,"context_line":"        finally:"},{"line_number":489,"context_line":"            # NOTE(I159):Use dest for _post_downgrade_### name interpolation if"},{"line_number":490,"context_line":"            # we downgrade an initial migration."}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_328ce02e","line":487,"in_reply_to":"baada198_ea78bac2","updated":"2014-07-22 09:51:54.000000000","message":"drop_all will be here, actually we have no other way, because `drop_schema` can be hanged for a long time, until sqlalchemy can drop ENUMS.","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"71436eec21fcaef7125a88532627793492f04b15","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        finally:"},{"line_number":489,"context_line":"            # NOTE(I159):Use dest for _post_downgrade_### name interpolation if"},{"line_number":490,"context_line":"            # we downgrade an initial migration."},{"line_number":491,"context_line":"            if with_data:"},{"line_number":492,"context_line":"                post_downgrade \u003d getattr("},{"line_number":493,"context_line":"                    self, \"_post_downgrade_%s\" % curr, None)"},{"line_number":494,"context_line":"                if post_downgrade:"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_eafd1a0a","line":491,"updated":"2014-07-22 08:31:04.000000000","message":"Why is this check put to finally block? It shouldn\u0027t be run if applying of migrations have failed","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"73e05289dc3006af6180fb7e4196c7aba23fcf2d","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        finally:"},{"line_number":489,"context_line":"            # NOTE(I159):Use dest for _post_downgrade_### name interpolation if"},{"line_number":490,"context_line":"            # we downgrade an initial migration."},{"line_number":491,"context_line":"            if with_data:"},{"line_number":492,"context_line":"                post_downgrade \u003d getattr("},{"line_number":493,"context_line":"                    self, \"_post_downgrade_%s\" % curr, None)"},{"line_number":494,"context_line":"                if post_downgrade:"}],"source_content_type":"text/x-python","patch_set":27,"id":"baada198_92e92cba","line":491,"in_reply_to":"baada198_eafd1a0a","updated":"2014-07-22 09:51:54.000000000","message":"Well, yes... agree.","commit_id":"d3fed51d441340c1595cf9b6807f9283e16976ff"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"0081cb13c5ea827bc1359cb87a4a71d0fe98804d","unresolved":false,"context_lines":[{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def _drop_schema(self):"},{"line_number":440,"context_line":"        meta \u003d sqlalchemy.MetaData(bind\u003dself.engine)"},{"line_number":441,"context_line":"        meta.raflect()"},{"line_number":442,"context_line":"        meta.drop_all()"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"    def _revisions(self, downgrade\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_7452acdf","line":441,"updated":"2014-07-22 16:13:10.000000000","message":"\"raflect\" ?","commit_id":"c1dc0aa62010d8a8e646f176de92cede521c21d3"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"ada9e958872b6b925379d12fab2c06c90f8be546","unresolved":false,"context_lines":[{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def _drop_schema(self):"},{"line_number":440,"context_line":"        meta \u003d sqlalchemy.MetaData(bind\u003dself.engine)"},{"line_number":441,"context_line":"        meta.raflect()"},{"line_number":442,"context_line":"        meta.drop_all()"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"    def _revisions(self, downgrade\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":28,"id":"baada198_792d0e45","line":441,"in_reply_to":"baada198_7452acdf","updated":"2014-07-24 11:44:36.000000000","message":"Fixed. Shared meta provided.","commit_id":"c1dc0aa62010d8a8e646f176de92cede521c21d3"},{"author":{"_account_id":10391,"name":"Ihor Kalnytskyi","email":"ihor@kalnytskyi.com","username":"ikalnitsky"},"change_message_id":"a21b1d84595e41dd37cdbbb503aeeaf5d9f83be7","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    Test ability to upgrade and downgrade of every revision script."},{"line_number":429,"context_line":"    \"\"\""},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"    SCRIPT_LOCATION \u003d abc.abstractproperty(lambda: None)"},{"line_number":432,"context_line":"    \"Absolute path to a directory contains `env.py` and revisions directory.\""},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    @abc.abstractproperty"}],"source_content_type":"text/x-python","patch_set":33,"id":"baada198_52465f7f","line":431,"updated":"2014-08-07 11:21:24.000000000","message":"Please, don\u0027t mix different approaches for declaring abstract property. It looks bad. I\u0027ll appreciate if you rewrite this property in the way you do it just few lines below.\n\n    @abc.abstractproperty\n    def SCRIPT_LOCATION(self):\n        pas","commit_id":"115154a9d6c1ae8fe3a9d8e25376e987f28ef5a0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"21d60c129c668e4eaa7183d5f2cf290eac2dc6ce","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    Test ability to upgrade and downgrade of every revision script."},{"line_number":429,"context_line":"    \"\"\""},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"    SCRIPT_LOCATION \u003d abc.abstractproperty(lambda: None)"},{"line_number":432,"context_line":"    \"Absolute path to a directory contains `env.py` and revisions directory.\""},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    @abc.abstractproperty"}],"source_content_type":"text/x-python","patch_set":33,"id":"baada198_e8f8664d","line":431,"in_reply_to":"baada198_52465f7f","updated":"2014-08-07 13:04:49.000000000","message":"Done","commit_id":"115154a9d6c1ae8fe3a9d8e25376e987f28ef5a0"},{"author":{"_account_id":10391,"name":"Ihor Kalnytskyi","email":"ihor@kalnytskyi.com","username":"ikalnitsky"},"change_message_id":"a21b1d84595e41dd37cdbbb503aeeaf5d9f83be7","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        try:"},{"line_number":538,"context_line":"            with env.EnvironmentContext(self.config, self.script_dir, fn\u003dfn):"},{"line_number":539,"context_line":"                self.script_dir.run_env()"},{"line_number":540,"context_line":"        except exc.InitialMigrationDowngrade:"},{"line_number":541,"context_line":"            self.migrate_meta.drop_all()"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"        # NOTE(I159):Use dest for _post_downgrade_### name interpolation if"}],"source_content_type":"text/x-python","patch_set":33,"id":"baada198_2d143040","line":540,"updated":"2014-08-07 11:21:24.000000000","message":"Why you catch this exception? As far as I understand, alembic couldn\u0027t raise our custom exception. It looks like a mistake. Please correct me if I\u0027m wrong.","commit_id":"115154a9d6c1ae8fe3a9d8e25376e987f28ef5a0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"21d60c129c668e4eaa7183d5f2cf290eac2dc6ce","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        try:"},{"line_number":538,"context_line":"            with env.EnvironmentContext(self.config, self.script_dir, fn\u003dfn):"},{"line_number":539,"context_line":"                self.script_dir.run_env()"},{"line_number":540,"context_line":"        except exc.InitialMigrationDowngrade:"},{"line_number":541,"context_line":"            self.migrate_meta.drop_all()"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"        # NOTE(I159):Use dest for _post_downgrade_### name interpolation if"}],"source_content_type":"text/x-python","patch_set":33,"id":"baada198_23b0bf3f","line":540,"in_reply_to":"baada198_2d143040","updated":"2014-08-07 13:04:49.000000000","message":"It does initial revision script of a project (an OpenStack project). This solution came from discussion above in the comment feed. Ironic (the proof of concept patch is done for Ironic) used NotImplementedError in the initial downgrade scenario. But this is too common exception. Using of a common exceptions here, makes the _migrate_down method very vulnerable and unpredictable. So I chose to use very specific error class to determine desired behavior strictly.","commit_id":"115154a9d6c1ae8fe3a9d8e25376e987f28ef5a0"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"c091d102cec77989c6ee8efc47080d697734fd26","unresolved":false,"context_lines":[{"line_number":626,"context_line":"    def setup_alembic(self):"},{"line_number":627,"context_line":"        self.test.alembic_config \u003d config.Config()"},{"line_number":628,"context_line":"        self.test.alembic_config.set_main_option("},{"line_number":629,"context_line":"            \u0027connection\u0027, six.text_type(self._get_uri()))"},{"line_number":630,"context_line":"        self.test.alembic_config.set_main_option("},{"line_number":631,"context_line":"            \u0027script_location\u0027, self.test.SCRIPT_LOCATION)"},{"line_number":632,"context_line":"        self.test.script_dir \u003d script.ScriptDirectory.from_config("}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_cc711646","line":629,"updated":"2014-12-30 10:30:21.000000000","message":"why don\u0027t you take URI from engine?","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9e5d9cb33162d2f75d9be321cc23a7be07190e0b","unresolved":false,"context_lines":[{"line_number":626,"context_line":"    def setup_alembic(self):"},{"line_number":627,"context_line":"        self.test.alembic_config \u003d config.Config()"},{"line_number":628,"context_line":"        self.test.alembic_config.set_main_option("},{"line_number":629,"context_line":"            \u0027connection\u0027, six.text_type(self._get_uri()))"},{"line_number":630,"context_line":"        self.test.alembic_config.set_main_option("},{"line_number":631,"context_line":"            \u0027script_location\u0027, self.test.SCRIPT_LOCATION)"},{"line_number":632,"context_line":"        self.test.script_dir \u003d script.ScriptDirectory.from_config("}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_19c6e516","line":629,"in_reply_to":"3a961159_cc711646","updated":"2015-01-05 09:28:29.000000000","message":"Done","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"c091d102cec77989c6ee8efc47080d697734fd26","unresolved":false,"context_lines":[{"line_number":640,"context_line":"        self.setup_alembic()"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"class PostgresOpportunisticAlembicFixture("},{"line_number":644,"context_line":"        AlembicFixtureMixin, test_base.PostgreSQLOpportunisticFixture):"},{"line_number":645,"context_line":"    def setUp(self):"},{"line_number":646,"context_line":"        super(PostgresOpportunisticAlembicFixture, self).setUp()"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_4c71a6df","line":643,"updated":"2014-12-30 10:30:21.000000000","message":"I see, that you uses these fixtures in projects. Can we avoid of this an simplify project\u0027s realization?","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9e5d9cb33162d2f75d9be321cc23a7be07190e0b","unresolved":false,"context_lines":[{"line_number":640,"context_line":"        self.setup_alembic()"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"class PostgresOpportunisticAlembicFixture("},{"line_number":644,"context_line":"        AlembicFixtureMixin, test_base.PostgreSQLOpportunisticFixture):"},{"line_number":645,"context_line":"    def setUp(self):"},{"line_number":646,"context_line":"        super(PostgresOpportunisticAlembicFixture, self).setUp()"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_f942f9a9","line":643,"in_reply_to":"3a961159_4c71a6df","updated":"2015-01-05 09:28:29.000000000","message":"The fixture is extended from the base one and contains some common preparations. The only way to reduce a base Alembic fixture I see is to copy `setup_alembic` method for both of fixtures . But this is contrary to DRY principle. I\u0027d rather avoid this copy-paste.","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"c091d102cec77989c6ee8efc47080d697734fd26","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        pass"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"    @abc.abstractproperty"},{"line_number":684,"context_line":"    def migrate_meta(self):"},{"line_number":685,"context_line":"        \"\"\"Provide shared sqlalchemy MetaData instance.\"\"\""},{"line_number":686,"context_line":"        pass"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_2c81bafb","line":684,"updated":"2014-12-30 10:30:21.000000000","message":"this looks a bit strange for me. Why do we need it?","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9e5d9cb33162d2f75d9be321cc23a7be07190e0b","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        pass"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"    @abc.abstractproperty"},{"line_number":684,"context_line":"    def migrate_meta(self):"},{"line_number":685,"context_line":"        \"\"\"Provide shared sqlalchemy MetaData instance.\"\"\""},{"line_number":686,"context_line":"        pass"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_996bb51e","line":684,"in_reply_to":"3a961159_2c81bafb","updated":"2015-01-05 09:28:29.000000000","message":"Usually this property returns `self.metadata`, which could be provided in `setUp` method not in `__init__`. And it could be changed every test call. This is really not necessarily but it could be useful in some cases.","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"c091d102cec77989c6ee8efc47080d697734fd26","unresolved":false,"context_lines":[{"line_number":697,"context_line":"        revisions \u003d list(self.script_dir.walk_revisions(\"base\", \"head\"))"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"        if not downgrade:"},{"line_number":700,"context_line":"            revisions \u003d list(reversed(revisions))"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        if not revisions:"},{"line_number":703,"context_line":"            raise exc.DbMigrationError(\u0027There is no suitable migrations.\u0027)"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_ccbf56a9","line":700,"updated":"2014-12-30 10:30:21.000000000","message":"nit:\n\n if not downgrade:\n     revisions.reverse()","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9e5d9cb33162d2f75d9be321cc23a7be07190e0b","unresolved":false,"context_lines":[{"line_number":697,"context_line":"        revisions \u003d list(self.script_dir.walk_revisions(\"base\", \"head\"))"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"        if not downgrade:"},{"line_number":700,"context_line":"            revisions \u003d list(reversed(revisions))"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        if not revisions:"},{"line_number":703,"context_line":"            raise exc.DbMigrationError(\u0027There is no suitable migrations.\u0027)"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_39c9e125","line":700,"in_reply_to":"3a961159_ccbf56a9","updated":"2015-01-05 09:28:29.000000000","message":"Done","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"c091d102cec77989c6ee8efc47080d697734fd26","unresolved":false,"context_lines":[{"line_number":710,"context_line":"                # Destination, current"},{"line_number":711,"context_line":"                yield rev.revision, rev.down_revision"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def _walk_versions(self, downgrade\u003dTrue, snake_walk\u003dFalse):"},{"line_number":714,"context_line":"        \"\"\"Test migrations ability to upgrade and downgrade."},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        :param downgrade: whether to include downgrade behavior or not."}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_ccc3d655","line":713,"updated":"2014-12-30 10:30:21.000000000","message":"I\u0027d suggest to rename this function from `_walk_versions` to `walk_versions`, because it supposed to be a part of the external API","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9e5d9cb33162d2f75d9be321cc23a7be07190e0b","unresolved":false,"context_lines":[{"line_number":710,"context_line":"                # Destination, current"},{"line_number":711,"context_line":"                yield rev.revision, rev.down_revision"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    def _walk_versions(self, downgrade\u003dTrue, snake_walk\u003dFalse):"},{"line_number":714,"context_line":"        \"\"\"Test migrations ability to upgrade and downgrade."},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        :param downgrade: whether to include downgrade behavior or not."}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_59d06dc9","line":713,"in_reply_to":"3a961159_ccc3d655","updated":"2015-01-05 09:28:29.000000000","message":"Done","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"c091d102cec77989c6ee8efc47080d697734fd26","unresolved":false,"context_lines":[{"line_number":740,"context_line":"                    self._migrate_up(curr, dest, with_data\u003dTrue)"},{"line_number":741,"context_line":"                    self._migrate_down(dest, curr, with_data\u003dTrue)"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"    def _migrate_down(self, dest, curr, with_data\u003dFalse):"},{"line_number":744,"context_line":"        \"\"\"Test migrations for ability to downgrade."},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        If subclass test case tests result of downgrading of migrations with"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_ec9fb263","line":743,"updated":"2014-12-30 10:30:21.000000000","message":"same suggestion as on line 713","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9e5d9cb33162d2f75d9be321cc23a7be07190e0b","unresolved":false,"context_lines":[{"line_number":740,"context_line":"                    self._migrate_up(curr, dest, with_data\u003dTrue)"},{"line_number":741,"context_line":"                    self._migrate_down(dest, curr, with_data\u003dTrue)"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"    def _migrate_down(self, dest, curr, with_data\u003dFalse):"},{"line_number":744,"context_line":"        \"\"\"Test migrations for ability to downgrade."},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        If subclass test case tests result of downgrading of migrations with"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_79d369d5","line":743,"in_reply_to":"3a961159_ec9fb263","updated":"2015-01-05 09:28:29.000000000","message":"Done","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"c091d102cec77989c6ee8efc47080d697734fd26","unresolved":false,"context_lines":[{"line_number":763,"context_line":"                self.alembic_config, self.script_dir, fn\u003dfn):"},{"line_number":764,"context_line":"                self.script_dir.run_env()"},{"line_number":765,"context_line":"        except exc.InitialMigrationDowngrade:"},{"line_number":766,"context_line":"            self.migrate_meta.drop_all()"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"        # NOTE(I159):Use dest for _post_downgrade_### name interpolation if"},{"line_number":769,"context_line":"        # we downgrade an initial migration."}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_8c90ee4f","line":766,"updated":"2014-12-30 10:30:21.000000000","message":"It\u0027s seems to be, that we do not handle this situation in WalkVersionsMixin","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9e5d9cb33162d2f75d9be321cc23a7be07190e0b","unresolved":false,"context_lines":[{"line_number":763,"context_line":"                self.alembic_config, self.script_dir, fn\u003dfn):"},{"line_number":764,"context_line":"                self.script_dir.run_env()"},{"line_number":765,"context_line":"        except exc.InitialMigrationDowngrade:"},{"line_number":766,"context_line":"            self.migrate_meta.drop_all()"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"        # NOTE(I159):Use dest for _post_downgrade_### name interpolation if"},{"line_number":769,"context_line":"        # we downgrade an initial migration."}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_f94759a1","line":766,"in_reply_to":"3a961159_8c90ee4f","updated":"2015-01-05 09:28:29.000000000","message":"Why shall we better skip the empty condition?","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"c091d102cec77989c6ee8efc47080d697734fd26","unresolved":false,"context_lines":[{"line_number":774,"context_line":"                post_downgrade(self.migrate_engine)"},{"line_number":775,"context_line":"                self.migrate_engine.dispose()"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"    def _migrate_up(self, dest, curr, with_data\u003dFalse):"},{"line_number":778,"context_line":"        \"\"\"Test migrations for ability to upgrade."},{"line_number":779,"context_line":""},{"line_number":780,"context_line":"        If subclass test case tests changes newly applied with migration with"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_0ca5deb4","line":777,"updated":"2014-12-30 10:30:21.000000000","message":"same suggestion as on line 713","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"9e5d9cb33162d2f75d9be321cc23a7be07190e0b","unresolved":false,"context_lines":[{"line_number":774,"context_line":"                post_downgrade(self.migrate_engine)"},{"line_number":775,"context_line":"                self.migrate_engine.dispose()"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"    def _migrate_up(self, dest, curr, with_data\u003dFalse):"},{"line_number":778,"context_line":"        \"\"\"Test migrations for ability to upgrade."},{"line_number":779,"context_line":""},{"line_number":780,"context_line":"        If subclass test case tests changes newly applied with migration with"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a961159_99d9f5f6","line":777,"in_reply_to":"3a961159_0ca5deb4","updated":"2015-01-05 09:28:29.000000000","message":"Done","commit_id":"98a857cfb399c14b2566e197de29f85814e234f0"}],"tests/sqlalchemy/test_migrations.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"7fb7b8da3d5b5bb8e7ab08ac0b9b362ea3e2e798","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        self.assertEqual(upgraded, self._migrate_up.call_args_list)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"class TestAlembicMigrations(migrate.AlembicPoweredWalkVersions,"},{"line_number":171,"context_line":"                            test_base.BaseTestCase):"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    PATH_TO_INI \u003d os.path.abspath(\u0027alembic.ini\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_5614e8e8","line":170,"updated":"2014-06-23 14:51:42.000000000","message":"we aren\u0027t doing any assertions in these tests","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"354d428a7320e293006d5f476014b18e3ab7d6a1","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        self.assertEqual(upgraded, self._migrate_up.call_args_list)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"class TestAlembicMigrations(migrate.AlembicPoweredWalkVersions,"},{"line_number":171,"context_line":"                            test_base.BaseTestCase):"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    PATH_TO_INI \u003d os.path.abspath(\u0027alembic.ini\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_768d5fd3","line":170,"in_reply_to":"1ae5cdf2_5614e8e8","updated":"2014-06-23 17:02:29.000000000","message":"Hmm, actually I made an assertion in this test case: 184. Should it be there?","commit_id":"03d0653f4c47e00ad114ea99998282e8fe68bf8a"}]}
