)]}'
{"nova/compute/resource_tracker.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1fa533957110aacc6035acdc79e35c6ef3720054","unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        if not self.compute_node:"},{"line_number":413,"context_line":"            # Need to create the ComputeNode record:"},{"line_number":414,"context_line":"            resources[\u0027service_id\u0027] \u003d service.id"},{"line_number":415,"context_line":"            resources[\u0027host\u0027] \u003d self.host"},{"line_number":416,"context_line":"            self._create(context, resources)"},{"line_number":417,"context_line":"            if self.pci_tracker:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_5efa8343","side":"PARENT","line":414,"updated":"2015-02-12 14:05:57.000000000","message":"Nevermind the change, I\u0027ll remove it","commit_id":"eaf26b5bb3da5aad6f0c44834071c1668997169f"}],"nova/db/sqlalchemy/migrate_repo/versions/275_remove_service_fk_in_compute_nodes.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d561d9d8c90d09f2336023d0bf152f18788c912b","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    services \u003d Table(\u0027services\u0027, meta, autoload\u003dTrue)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    for fk in compute_nodes.foreign_keys:"},{"line_number":30,"context_line":"        # NOTE(sbauza): sqlalchemy-migrate now doesn\u0027t support dropping SQLite"},{"line_number":31,"context_line":"        # foreign keys so we need to workaround this with a cost of consistency"},{"line_number":32,"context_line":"        if migrate_engine.name !\u003d \u0027sqlite\u0027 and fk.column \u003d\u003d services.c.id:"},{"line_number":33,"context_line":"            # Delete the FK"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_78e4ba0c","line":30,"updated":"2015-02-12 14:58:52.000000000","message":"I\u0027d put a reference to the other migration that added the FKeys for sqlite but didn\u0027t support the downgrade path due to the limitation in sqlalchemy-migrate.\n\nWe should probably also get a wishlist bug reported against sqlalchemy-migrate for adding this function.","commit_id":"efe5b83aa8f269a8aea7ac6d738a579e9b38026b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a0e098e313ee07c080c704d8235c0cd95759d0c2","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    services \u003d Table(\u0027services\u0027, meta, autoload\u003dTrue)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    for fk in compute_nodes.foreign_keys:"},{"line_number":30,"context_line":"        # NOTE(sbauza): sqlalchemy-migrate now doesn\u0027t support dropping SQLite"},{"line_number":31,"context_line":"        # foreign keys so we need to workaround this with a cost of consistency"},{"line_number":32,"context_line":"        if migrate_engine.name !\u003d \u0027sqlite\u0027 and fk.column \u003d\u003d services.c.id:"},{"line_number":33,"context_line":"            # Delete the FK"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_fb798493","line":30,"in_reply_to":"da86d52c_78e4ba0c","updated":"2015-02-12 15:03:06.000000000","message":"+1","commit_id":"efe5b83aa8f269a8aea7ac6d738a579e9b38026b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d561d9d8c90d09f2336023d0bf152f18788c912b","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    for fk in compute_nodes.foreign_keys:"},{"line_number":30,"context_line":"        # NOTE(sbauza): sqlalchemy-migrate now doesn\u0027t support dropping SQLite"},{"line_number":31,"context_line":"        # foreign keys so we need to workaround this with a cost of consistency"},{"line_number":32,"context_line":"        if migrate_engine.name !\u003d \u0027sqlite\u0027 and fk.column \u003d\u003d services.c.id:"},{"line_number":33,"context_line":"            # Delete the FK"},{"line_number":34,"context_line":"            fkey \u003d ForeignKeyConstraint(columns\u003d[compute_nodes.c.service_id],"},{"line_number":35,"context_line":"                                        refcolumns\u003d[services.c.id],"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_d8a3e6af","line":32,"updated":"2015-02-12 14:58:52.000000000","message":"I would just move the sqlite skip up to the very top of the upgrade rather than in the loop.  We don\u0027t need to do anything if we\u0027re on sqlite here.","commit_id":"efe5b83aa8f269a8aea7ac6d738a579e9b38026b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a0e098e313ee07c080c704d8235c0cd95759d0c2","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    for fk in compute_nodes.foreign_keys:"},{"line_number":30,"context_line":"        # NOTE(sbauza): sqlalchemy-migrate now doesn\u0027t support dropping SQLite"},{"line_number":31,"context_line":"        # foreign keys so we need to workaround this with a cost of consistency"},{"line_number":32,"context_line":"        if migrate_engine.name !\u003d \u0027sqlite\u0027 and fk.column \u003d\u003d services.c.id:"},{"line_number":33,"context_line":"            # Delete the FK"},{"line_number":34,"context_line":"            fkey \u003d ForeignKeyConstraint(columns\u003d[compute_nodes.c.service_id],"},{"line_number":35,"context_line":"                                        refcolumns\u003d[services.c.id],"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_bb2d4c91","line":32,"in_reply_to":"da86d52c_d8a3e6af","updated":"2015-02-12 15:03:06.000000000","message":"Agreed","commit_id":"efe5b83aa8f269a8aea7ac6d738a579e9b38026b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d561d9d8c90d09f2336023d0bf152f18788c912b","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    # NOTE(sbauza): See 216_havana.py for the whole logic"},{"line_number":67,"context_line":"    if migrate_engine.name \u003d\u003d \u0027mysql\u0027 or migrate_engine.name \u003d\u003d \u0027sqlite\u0027:"},{"line_number":68,"context_line":"        # For MySQL we name our fkeys explicitly so they match Havana"},{"line_number":69,"context_line":"        fkey \u003d ForeignKeyConstraint(columns\u003d[compute_nodes.c.service_id],"},{"line_number":70,"context_line":"                                    refcolumns\u003d[services.c.id],"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_18d01ec8","line":67,"updated":"2015-02-12 14:58:52.000000000","message":"Could we swap the if/elif here so that we do the pg case alone and then just have an else which would cover mysql/sqlite and eventually DB2 since DB2 does this the same as MySQL in the 216 migration, see the DB2 change which will hopefully land in Liberty:\n\nhttps://review.openstack.org/#/c/69047/42/nova/db/sqlalchemy/migrate_repo/versions/216_havana.py\n\nDoing that would save me one more change in the DB2 patch.","commit_id":"efe5b83aa8f269a8aea7ac6d738a579e9b38026b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a0e098e313ee07c080c704d8235c0cd95759d0c2","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    # NOTE(sbauza): See 216_havana.py for the whole logic"},{"line_number":67,"context_line":"    if migrate_engine.name \u003d\u003d \u0027mysql\u0027 or migrate_engine.name \u003d\u003d \u0027sqlite\u0027:"},{"line_number":68,"context_line":"        # For MySQL we name our fkeys explicitly so they match Havana"},{"line_number":69,"context_line":"        fkey \u003d ForeignKeyConstraint(columns\u003d[compute_nodes.c.service_id],"},{"line_number":70,"context_line":"                                    refcolumns\u003d[services.c.id],"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_5b3c50c8","line":67,"in_reply_to":"da86d52c_18d01ec8","updated":"2015-02-12 15:03:06.000000000","message":"Sure thing","commit_id":"efe5b83aa8f269a8aea7ac6d738a579e9b38026b"}],"nova/db/sqlalchemy/migrate_repo/versions/277_remove_service_fk_in_compute_nodes.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"80f1e55c20d14b34ddc37e00e667b5990a464021","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    shadow_compute_nodes.c.service_id.alter(nullable\u003dTrue)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    if migrate_engine.name \u003d\u003d \u0027sqlite\u0027:"},{"line_number":34,"context_line":"        # NOTE(sbauza): sqlalchemy-migrate now doesn\u0027t support dropping SQLite"},{"line_number":35,"context_line":"        # foreign keys so we need to workaround this with a cost of consistency"},{"line_number":36,"context_line":"        # See the #273 DB migration that explains it doesn\u0027t provide a"},{"line_number":37,"context_line":"        # downgrade method because of the non-support of FK deletions for"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_7920eff7","line":34,"updated":"2015-02-20 18:44:21.000000000","message":"booya: https://review.openstack.org/#/c/157878/\n\nWe have some other changes to get into sqla-migrate before we can do a release though and zzzeek is out next week.","commit_id":"1260c7a8603414d5d6e50233698dd7f9843fbad7"}],"nova/db/sqlalchemy/migrate_repo/versions/277_sqlite_downgrade.sql":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25d50b493e3a9180c13fc1bf7b02aa2fdca7760f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"CREATE TABLE compute_nodes_new ("},{"line_number":2,"context_line":"    created_at DATETIME,"},{"line_number":3,"context_line":"    updated_at DATETIME,"},{"line_number":4,"context_line":"    deleted_at DATETIME,"}],"source_content_type":"text/x-sql","patch_set":8,"id":"ba7be1f8_f6be05ad","line":1,"updated":"2015-02-25 19:53:44.000000000","message":"sqlalchemy-migrate 0.9.5 is out so let\u0027s use that:\n\nhttps://pypi.python.org/pypi/sqlalchemy-migrate/0.9.5\n\nI\u0027ll update global-requirements to make it the minimum required version.","commit_id":"3909841e246668101a91b131f32cbdfbf94e3bb1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d0c280e5967be291d7d13e16a48f5f7d53d10746","unresolved":false,"context_lines":[{"line_number":1,"context_line":"CREATE TABLE compute_nodes_new ("},{"line_number":2,"context_line":"    created_at DATETIME,"},{"line_number":3,"context_line":"    updated_at DATETIME,"},{"line_number":4,"context_line":"    deleted_at DATETIME,"}],"source_content_type":"text/x-sql","patch_set":8,"id":"ba7be1f8_b73f5624","line":1,"in_reply_to":"ba7be1f8_cc5414cc","updated":"2015-03-03 12:03:07.000000000","message":"If you agree, I\u0027ll still continue to provide the sqlite changes until we are sure that sqlalchemy-migrate is pinned to 0.9.5 minimum. Of course, there are little chances to release Kilo without updating those requirements but we are close to Feature Freeze and IIRC that\u0027s also a dep freeze.\n\nJust to be clear, I\u0027ll add a comment on top of the files","commit_id":"3909841e246668101a91b131f32cbdfbf94e3bb1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33d6b045a66831505977b74d6c75057e620371b5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"CREATE TABLE compute_nodes_new ("},{"line_number":2,"context_line":"    created_at DATETIME,"},{"line_number":3,"context_line":"    updated_at DATETIME,"},{"line_number":4,"context_line":"    deleted_at DATETIME,"}],"source_content_type":"text/x-sql","patch_set":8,"id":"ba7be1f8_cc5414cc","line":1,"in_reply_to":"ba7be1f8_f6be05ad","updated":"2015-02-25 20:41:18.000000000","message":"global-reqs update:\n\nhttps://review.openstack.org/#/c/159242/","commit_id":"3909841e246668101a91b131f32cbdfbf94e3bb1"}],"nova/db/sqlalchemy/migrate_repo/versions/278_remove_service_fk_in_compute_nodes.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2e1003b3eae5570e5cde613532566f82ef00c228","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy.engine import reflection"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def _correct_sqlite_unique_keys(migrate_engine, table):"},{"line_number":23,"context_line":"    # NOTE(sbauza): sqlite\u003c1.0 doesn\u0027t provide the unique keys in the"},{"line_number":24,"context_line":"    # constraints field of the Table object, so it would drop them if we change"},{"line_number":25,"context_line":"    # either the scheme or the constraints. Adding them back to the Table"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_e71542e6","line":22,"updated":"2015-03-10 14:07:15.000000000","message":"nit: I\u0027d probably call this \"_correct_sqlite_unique_constraints\"","commit_id":"1892c02f64ed4c46696d8bceb9cb322f41bb6de5"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7c5341cd90bc20e1b0a8c5249dfb43b9e5bd07d4","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy.engine import reflection"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def _correct_sqlite_unique_keys(migrate_engine, table):"},{"line_number":23,"context_line":"    # NOTE(sbauza): sqlite\u003c1.0 doesn\u0027t provide the unique keys in the"},{"line_number":24,"context_line":"    # constraints field of the Table object, so it would drop them if we change"},{"line_number":25,"context_line":"    # either the scheme or the constraints. Adding them back to the Table"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_2a163fa8","line":22,"in_reply_to":"9a80dd14_e71542e6","updated":"2015-03-10 14:29:05.000000000","message":"agreed","commit_id":"1892c02f64ed4c46696d8bceb9cb322f41bb6de5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2e1003b3eae5570e5cde613532566f82ef00c228","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def _correct_sqlite_unique_keys(migrate_engine, table):"},{"line_number":23,"context_line":"    # NOTE(sbauza): sqlite\u003c1.0 doesn\u0027t provide the unique keys in the"},{"line_number":24,"context_line":"    # constraints field of the Table object, so it would drop them if we change"},{"line_number":25,"context_line":"    # either the scheme or the constraints. Adding them back to the Table"},{"line_number":26,"context_line":"    # object before changing the model makes sure that they are not dropped."}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_070416c5","line":23,"updated":"2015-03-10 14:07:15.000000000","message":"sqlite or sqlalchemy?","commit_id":"1892c02f64ed4c46696d8bceb9cb322f41bb6de5"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7c5341cd90bc20e1b0a8c5249dfb43b9e5bd07d4","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def _correct_sqlite_unique_keys(migrate_engine, table):"},{"line_number":23,"context_line":"    # NOTE(sbauza): sqlite\u003c1.0 doesn\u0027t provide the unique keys in the"},{"line_number":24,"context_line":"    # constraints field of the Table object, so it would drop them if we change"},{"line_number":25,"context_line":"    # either the scheme or the constraints. Adding them back to the Table"},{"line_number":26,"context_line":"    # object before changing the model makes sure that they are not dropped."}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ea4427b9","line":23,"in_reply_to":"9a80dd14_070416c5","updated":"2015-03-10 14:29:05.000000000","message":"*facepalm*","commit_id":"1892c02f64ed4c46696d8bceb9cb322f41bb6de5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"141cd91229ce128aa2b833405bea1ef4f800b2b1","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    inspector \u003d reflection.Inspector.from_engine(migrate_engine)"},{"line_number":31,"context_line":"    constraints \u003d inspector.get_unique_constraints(table.name)"},{"line_number":32,"context_line":"    for constraint in constraints:"},{"line_number":33,"context_line":"        if constraint[\u0027name\u0027] in [c.name for c in table.constraints]:"},{"line_number":34,"context_line":"            # the constraint is already in the table"},{"line_number":35,"context_line":"            continue"},{"line_number":36,"context_line":"        table.constraints.add("}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_80178c44","line":33,"updated":"2015-03-12 19:33:06.000000000","message":"Maybe pull [c.name for c in table.constraints] construction out of the for loop?","commit_id":"d93db92b7e312429d0e99b80a605c0028d057f87"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"861e9f13211b16086c3b2c248f401b006d3fa9a5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    inspector \u003d reflection.Inspector.from_engine(migrate_engine)"},{"line_number":31,"context_line":"    constraints \u003d inspector.get_unique_constraints(table.name)"},{"line_number":32,"context_line":"    for constraint in constraints:"},{"line_number":33,"context_line":"        if constraint[\u0027name\u0027] in [c.name for c in table.constraints]:"},{"line_number":34,"context_line":"            # the constraint is already in the table"},{"line_number":35,"context_line":"            continue"},{"line_number":36,"context_line":"        table.constraints.add("}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_1c38409f","line":33,"in_reply_to":"9a80dd14_80178c44","updated":"2015-03-13 13:04:57.000000000","message":"Done","commit_id":"d93db92b7e312429d0e99b80a605c0028d057f87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"141cd91229ce128aa2b833405bea1ef4f800b2b1","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    _correct_sqlite_unique_constraints(migrate_engine, compute_nodes)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # Make the service_id column nullable"},{"line_number":52,"context_line":"    compute_nodes.c.service_id.alter(nullable\u003dTrue)"},{"line_number":53,"context_line":"    shadow_compute_nodes.c.service_id.alter(nullable\u003dTrue)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_2042603e","line":51,"updated":"2015-03-12 19:33:06.000000000","message":"Hmm, what if you moved this to after you dropped the FKeys and indexes?  Would that invalidate the need for _correct_sqlite_unique_constraints?","commit_id":"d93db92b7e312429d0e99b80a605c0028d057f87"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"861e9f13211b16086c3b2c248f401b006d3fa9a5","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    _correct_sqlite_unique_constraints(migrate_engine, compute_nodes)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # Make the service_id column nullable"},{"line_number":52,"context_line":"    compute_nodes.c.service_id.alter(nullable\u003dTrue)"},{"line_number":53,"context_line":"    shadow_compute_nodes.c.service_id.alter(nullable\u003dTrue)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_fc136cfe","line":51,"in_reply_to":"9a80dd14_2042603e","updated":"2015-03-13 13:04:57.000000000","message":"That\u0027s still needed because the bug is relative to unique keys for each constraint change, not only for scheme changes.","commit_id":"d93db92b7e312429d0e99b80a605c0028d057f87"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"141cd91229ce128aa2b833405bea1ef4f800b2b1","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    _correct_sqlite_unique_constraints(migrate_engine, compute_nodes)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # Make the service_id column nullable"},{"line_number":52,"context_line":"    compute_nodes.c.service_id.alter(nullable\u003dTrue)"},{"line_number":53,"context_line":"    shadow_compute_nodes.c.service_id.alter(nullable\u003dTrue)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    for fk in compute_nodes.foreign_keys:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_005b9cf6","line":52,"updated":"2015-03-12 19:33:06.000000000","message":"Maybe naive, but why don\u0027t we just drop the service_id column if it\u0027s no longer used?","commit_id":"d93db92b7e312429d0e99b80a605c0028d057f87"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"861e9f13211b16086c3b2c248f401b006d3fa9a5","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    _correct_sqlite_unique_constraints(migrate_engine, compute_nodes)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # Make the service_id column nullable"},{"line_number":52,"context_line":"    compute_nodes.c.service_id.alter(nullable\u003dTrue)"},{"line_number":53,"context_line":"    shadow_compute_nodes.c.service_id.alter(nullable\u003dTrue)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    for fk in compute_nodes.foreign_keys:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_5c0c78ec","line":52,"in_reply_to":"9a80dd14_005b9cf6","updated":"2015-03-13 13:04:57.000000000","message":"Nope, we can\u0027t because Juno computes are still updating service_id while I want to remove service_id from Kilo nodes.\n\nSo, until we\u0027re sure that all compute nodes are not providing this field, we can\u0027t just remove it.","commit_id":"d93db92b7e312429d0e99b80a605c0028d057f87"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3d85d6afc9fe4559ca4c7cbb9b7f05636ff438ad","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy.engine import reflection"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def _correct_sqlite_unique_constraints(migrate_engine, table):"},{"line_number":23,"context_line":"    # NOTE(sbauza): SQLAlchemy\u003c1.0 doesn\u0027t provide the unique keys in the"},{"line_number":24,"context_line":"    # constraints field of the Table object, so it would drop them if we change"},{"line_number":25,"context_line":"    # either the scheme or the constraints. Adding them back to the Table"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_454bb8b0","line":22,"updated":"2015-03-13 15:29:26.000000000","message":"Honestly, I really don\u0027t give a hoot about SQLite when it comes to database schema migrations...","commit_id":"551be2c52a29cb2755de4825a3fcb2c8f7d7b3f1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"01cb7a9b3769f999bab2bba4a331f0397b7986a2","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy.engine import reflection"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def _correct_sqlite_unique_constraints(migrate_engine, table):"},{"line_number":23,"context_line":"    # NOTE(sbauza): SQLAlchemy\u003c1.0 doesn\u0027t provide the unique keys in the"},{"line_number":24,"context_line":"    # constraints field of the Table object, so it would drop them if we change"},{"line_number":25,"context_line":"    # either the scheme or the constraints. Adding them back to the Table"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_c8a6cbaa","line":22,"in_reply_to":"9a80dd14_454bb8b0","updated":"2015-03-13 21:54:06.000000000","message":"You don\u0027t, but test_models_sync does, which is why we have all of this stuff...","commit_id":"551be2c52a29cb2755de4825a3fcb2c8f7d7b3f1"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"d06df1b0919ac667e6233c859d64608a98cd1294","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy.engine import reflection"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def _correct_sqlite_unique_constraints(migrate_engine, table):"},{"line_number":23,"context_line":"    # NOTE(sbauza): SQLAlchemy\u003c1.0 doesn\u0027t provide the unique keys in the"},{"line_number":24,"context_line":"    # constraints field of the Table object, so it would drop them if we change"},{"line_number":25,"context_line":"    # either the scheme or the constraints. Adding them back to the Table"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_aeefdfe7","line":22,"in_reply_to":"9a80dd14_c8a6cbaa","updated":"2015-03-13 22:50:23.000000000","message":"Since we now have fairly robust testing against MySQL and PostgreSQL, I don\u0027t see the value of continuing to test database migrations against SQLite.\n\nWe don\u0027t support deployments using SQLite and continuing to test against it just creates more work (like this).\n\nThe only benefit I can see for it is that always runs, whereas the MySQL and PostgreSQL migration tests need to be setup to run.\n\nMaybe SQLite database migration testing can be dropped at the beginning of Liberty.","commit_id":"551be2c52a29cb2755de4825a3fcb2c8f7d7b3f1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3d85d6afc9fe4559ca4c7cbb9b7f05636ff438ad","unresolved":false,"context_lines":[{"line_number":22,"context_line":"def _correct_sqlite_unique_constraints(migrate_engine, table):"},{"line_number":23,"context_line":"    # NOTE(sbauza): SQLAlchemy\u003c1.0 doesn\u0027t provide the unique keys in the"},{"line_number":24,"context_line":"    # constraints field of the Table object, so it would drop them if we change"},{"line_number":25,"context_line":"    # either the scheme or the constraints. Adding them back to the Table"},{"line_number":26,"context_line":"    # object before changing the model makes sure that they are not dropped."},{"line_number":27,"context_line":"    if migrate_engine.name !\u003d \u0027sqlite\u0027:"},{"line_number":28,"context_line":"        # other engines don\u0027t have this problem"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_454658c1","line":25,"updated":"2015-03-13 15:29:26.000000000","message":"s/scheme/schema/","commit_id":"551be2c52a29cb2755de4825a3fcb2c8f7d7b3f1"}],"nova/db/sqlalchemy/migrate_repo/versions/278_sqlite_downgrade.sql":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0be4cddb1129c9451386c597f9a505f6203c2d08","unresolved":false,"context_lines":[{"line_number":1,"context_line":"-- This file is needed until Nova pins sqlalchemy-migrate to \u003e0.9.5 in order"},{"line_number":2,"context_line":"-- to make sure that it can correctly drop an sqlite FK"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"CREATE TABLE compute_nodes_new ("}],"source_content_type":"text/x-sql","patch_set":10,"id":"9a80dd14_51bb0d0e","line":1,"updated":"2015-03-04 17:42:19.000000000","message":"https://review.openstack.org/#/c/159242/ is approved, then there should be a requirements update bot and we\u0027ll be good to go with not needing this.","commit_id":"504566ba05af5dd110727c9cb28e5e85bba5cca0"}],"nova/tests/unit/db/test_migrations.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2e1003b3eae5570e5cde613532566f82ef00c228","unresolved":false,"context_lines":[{"line_number":839,"context_line":""},{"line_number":840,"context_line":"    def _post_downgrade_278(self, engine):"},{"line_number":841,"context_line":"        compute_nodes \u003d oslodbutils.get_table(engine, \u0027compute_nodes\u0027)"},{"line_number":842,"context_line":"        self.assertEqual(1, len([fk for fk in compute_nodes.foreign_keys"},{"line_number":843,"context_line":"                                 if fk.parent.name \u003d\u003d \u0027service_id\u0027"},{"line_number":844,"context_line":"                                 and fk.column.name \u003d\u003d \u0027id\u0027]))"},{"line_number":845,"context_line":"        self.assertFalse(compute_nodes.c.service_id.nullable)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0787b613","line":842,"updated":"2015-03-10 14:07:15.000000000","message":"Would also be good to check the name in the postgresql and non-postgresql cases since we have logic to do that in downgrade.","commit_id":"1892c02f64ed4c46696d8bceb9cb322f41bb6de5"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7c5341cd90bc20e1b0a8c5249dfb43b9e5bd07d4","unresolved":false,"context_lines":[{"line_number":839,"context_line":""},{"line_number":840,"context_line":"    def _post_downgrade_278(self, engine):"},{"line_number":841,"context_line":"        compute_nodes \u003d oslodbutils.get_table(engine, \u0027compute_nodes\u0027)"},{"line_number":842,"context_line":"        self.assertEqual(1, len([fk for fk in compute_nodes.foreign_keys"},{"line_number":843,"context_line":"                                 if fk.parent.name \u003d\u003d \u0027service_id\u0027"},{"line_number":844,"context_line":"                                 and fk.column.name \u003d\u003d \u0027id\u0027]))"},{"line_number":845,"context_line":"        self.assertFalse(compute_nodes.c.service_id.nullable)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_8a52cb66","line":842,"in_reply_to":"9a80dd14_0787b613","updated":"2015-03-10 14:29:05.000000000","message":"Done","commit_id":"1892c02f64ed4c46696d8bceb9cb322f41bb6de5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"141cd91229ce128aa2b833405bea1ef4f800b2b1","unresolved":false,"context_lines":[{"line_number":848,"context_line":"            # Only make sure that posgresql at least adds a name for the FK"},{"line_number":849,"context_line":"            self.assertIsNotNone(service_id_fks[0].name)"},{"line_number":850,"context_line":"        elif engine.name \u003d\u003d \u0027sqlite\u0027:"},{"line_number":851,"context_line":"            # Erm, sqlite doesn\u0027t add the FK name even if provided..."},{"line_number":852,"context_line":"            self.assertIsNone(service_id_fks[0].name)"},{"line_number":853,"context_line":"        else:"},{"line_number":854,"context_line":"            self.assertEqual(\u0027fk_compute_nodes_service_id\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_bd3757fe","line":851,"updated":"2015-03-12 19:33:06.000000000","message":"Maybe this is a thing with sqlalchemy \u003c 1.0?  We could ask zzzeek.\n\nIt might be better to just skip sqlite with a comment, and do:\n\nelif engine.name !\u003d \u0027sqlite\u0027:\n\nThat would be the mysql (and eventually DB2 / ibm_db_sa) case.","commit_id":"d93db92b7e312429d0e99b80a605c0028d057f87"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"861e9f13211b16086c3b2c248f401b006d3fa9a5","unresolved":false,"context_lines":[{"line_number":848,"context_line":"            # Only make sure that posgresql at least adds a name for the FK"},{"line_number":849,"context_line":"            self.assertIsNotNone(service_id_fks[0].name)"},{"line_number":850,"context_line":"        elif engine.name \u003d\u003d \u0027sqlite\u0027:"},{"line_number":851,"context_line":"            # Erm, sqlite doesn\u0027t add the FK name even if provided..."},{"line_number":852,"context_line":"            self.assertIsNone(service_id_fks[0].name)"},{"line_number":853,"context_line":"        else:"},{"line_number":854,"context_line":"            self.assertEqual(\u0027fk_compute_nodes_service_id\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_9ca3509d","line":851,"in_reply_to":"9a80dd14_bd3757fe","updated":"2015-03-13 13:04:57.000000000","message":"Done","commit_id":"d93db92b7e312429d0e99b80a605c0028d057f87"}]}
