)]}'
{"keystone/common/sql/migrate_repo/versions/088_domain_specific_roles.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"75a5fbbcf768be21d61b861522575fe5996e2f9b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    # guaranteed to be named \u0027ixu_role_name\u0027, so we need to search for the"},{"line_number":34,"context_line":"    # correct constraint that only affects role_table.c.name and drop"},{"line_number":35,"context_line":"    # that constraint."},{"line_number":36,"context_line":"    constraints_to_drop \u003d []"},{"line_number":37,"context_line":"    for c in role_table.constraints:"},{"line_number":38,"context_line":"        if isinstance(c, sql.UniqueConstraint):"},{"line_number":39,"context_line":"            if len(c.columns) \u003d\u003d 1 and _ROLE_NAME_COLUMN_NAME in c.columns:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_4d3b0fec","line":36,"updated":"2016-03-28 21:57:57.000000000","message":"there should be only 1 constraint that gets dropped, so no need to have a list.\n\nThis comment applies to the other migrations, too.","commit_id":"53dd287b2a2c33963fedbc0bb51e5f58429e300a"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"06c7750bf6249257a17067e65613e31692ac162e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    # guaranteed to be named \u0027ixu_role_name\u0027, so we need to search for the"},{"line_number":34,"context_line":"    # correct constraint that only affects role_table.c.name and drop"},{"line_number":35,"context_line":"    # that constraint."},{"line_number":36,"context_line":"    constraints_to_drop \u003d []"},{"line_number":37,"context_line":"    for c in role_table.constraints:"},{"line_number":38,"context_line":"        if isinstance(c, sql.UniqueConstraint):"},{"line_number":39,"context_line":"            if len(c.columns) \u003d\u003d 1 and _ROLE_NAME_COLUMN_NAME in c.columns:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_735b5055","line":36,"in_reply_to":"ba0121b8_4d3b0fec","updated":"2016-03-28 23:03:48.000000000","message":"Works for me.","commit_id":"53dd287b2a2c33963fedbc0bb51e5f58429e300a"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"75a5fbbcf768be21d61b861522575fe5996e2f9b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            if len(c.columns) \u003d\u003d 1 and _ROLE_NAME_COLUMN_NAME in c.columns:"},{"line_number":40,"context_line":"                constraints_to_drop.append(c)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    for c in constraints_to_drop:"},{"line_number":43,"context_line":"        migrate.UniqueConstraint(role_table.c.name, name\u003dc.name).drop()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    migrate.UniqueConstraint(role_table.c.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_ed1ca379","line":42,"updated":"2016-03-28 21:57:57.000000000","message":"the code should verify that there\u0027s 1 constraint to drop and raise an exception if there isn\u0027t, since their database isn\u0027t as expected.","commit_id":"53dd287b2a2c33963fedbc0bb51e5f58429e300a"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"06c7750bf6249257a17067e65613e31692ac162e","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            if len(c.columns) \u003d\u003d 1 and _ROLE_NAME_COLUMN_NAME in c.columns:"},{"line_number":40,"context_line":"                constraints_to_drop.append(c)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    for c in constraints_to_drop:"},{"line_number":43,"context_line":"        migrate.UniqueConstraint(role_table.c.name, name\u003dc.name).drop()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    migrate.UniqueConstraint(role_table.c.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_1331340c","line":42,"in_reply_to":"ba0121b8_ed1ca379","updated":"2016-03-28 23:03:48.000000000","message":"Done in next.","commit_id":"53dd287b2a2c33963fedbc0bb51e5f58429e300a"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f1adbcc9fc7b98d4efe0fd43b7d1c02f3b52ec6b","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                           nullable\u003dFalse, server_default\u003d_NULL_DOMAIN_ID)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    # NOTE(morganfainberg): the `role_name` unique constraint is not"},{"line_number":32,"context_line":"    # guaranteed to be named \u0027ixu_role_name\u0027, so we need to search for the"},{"line_number":33,"context_line":"    # correct constraint that only affects role_table.c.name and drop"},{"line_number":34,"context_line":"    # that constraint."},{"line_number":35,"context_line":"    to_drop \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_4f4763bb","line":32,"range":{"start_line":32,"start_character":30,"end_line":32,"end_character":43},"updated":"2016-03-29 13:42:58.000000000","message":"readers might wonder where \"ixu_role_name\" came from since it\u0027s not mentioned anywhere else. Could just say that we don\u0027t know what the name is.","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"7a816ababc66dae25f5d2fe9932cd2b16be098a7","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                           nullable\u003dFalse, server_default\u003d_NULL_DOMAIN_ID)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    # NOTE(morganfainberg): the `role_name` unique constraint is not"},{"line_number":32,"context_line":"    # guaranteed to be named \u0027ixu_role_name\u0027, so we need to search for the"},{"line_number":33,"context_line":"    # correct constraint that only affects role_table.c.name and drop"},{"line_number":34,"context_line":"    # that constraint."},{"line_number":35,"context_line":"    to_drop \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_30040716","line":32,"range":{"start_line":32,"start_character":30,"end_line":32,"end_character":43},"in_reply_to":"ba0121b8_4f4763bb","updated":"2016-03-29 15:08:24.000000000","message":"Fixed in next","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f1adbcc9fc7b98d4efe0fd43b7d1c02f3b52ec6b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    # NOTE(morganfainberg): Only perform a drop if exactly one constraint was"},{"line_number":42,"context_line":"    # found. If 0 are found, there is nothing to do, if more than 1 is found"},{"line_number":43,"context_line":"    # error."},{"line_number":44,"context_line":"    if to_drop and len(to_drop) \u003d\u003d 1:"},{"line_number":45,"context_line":"        migrate.UniqueConstraint(role_table.c.name,"},{"line_number":46,"context_line":"                                 name\u003dto_drop[0].name).drop()"},{"line_number":47,"context_line":"    elif len(to_drop) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_4fc2c334","line":44,"updated":"2016-03-29 13:42:58.000000000","message":"no need to check to_drop since checking the len directly.","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"7a816ababc66dae25f5d2fe9932cd2b16be098a7","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    # NOTE(morganfainberg): Only perform a drop if exactly one constraint was"},{"line_number":42,"context_line":"    # found. If 0 are found, there is nothing to do, if more than 1 is found"},{"line_number":43,"context_line":"    # error."},{"line_number":44,"context_line":"    if to_drop and len(to_drop) \u003d\u003d 1:"},{"line_number":45,"context_line":"        migrate.UniqueConstraint(role_table.c.name,"},{"line_number":46,"context_line":"                                 name\u003dto_drop[0].name).drop()"},{"line_number":47,"context_line":"    elif len(to_drop) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_c309872e","line":44,"in_reply_to":"ba0121b8_4fc2c334","updated":"2016-03-29 15:08:24.000000000","message":"Fixed in next","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f1adbcc9fc7b98d4efe0fd43b7d1c02f3b52ec6b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                             \u0027Found constraints: %r\u0027 % to_drop)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    # perform changes after constraint is dropped."},{"line_number":54,"context_line":"    role_table.create_column(domain_id)"},{"line_number":55,"context_line":"    migrate.UniqueConstraint(role_table.c.name,"},{"line_number":56,"context_line":"                             role_table.c.domain_id,"},{"line_number":57,"context_line":"                             name\u003d_ROLE_NAME_NEW_CONSTRAINT).create()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_0f93ab5c","line":54,"updated":"2016-03-29 13:42:58.000000000","message":"If somebody had run this migration in its old form it will have failed after creating this column. The migration should handle the case where this column already exists.","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"7a816ababc66dae25f5d2fe9932cd2b16be098a7","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                             \u0027Found constraints: %r\u0027 % to_drop)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    # perform changes after constraint is dropped."},{"line_number":54,"context_line":"    role_table.create_column(domain_id)"},{"line_number":55,"context_line":"    migrate.UniqueConstraint(role_table.c.name,"},{"line_number":56,"context_line":"                             role_table.c.domain_id,"},{"line_number":57,"context_line":"                             name\u003d_ROLE_NAME_NEW_CONSTRAINT).create()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_e3100b51","line":54,"in_reply_to":"ba0121b8_0f93ab5c","updated":"2016-03-29 15:08:24.000000000","message":"Fixed in next.","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"}],"keystone/common/sql/migrate_repo/versions/096_drop_role_name_constraint.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f1adbcc9fc7b98d4efe0fd43b7d1c02f3b52ec6b","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    # correct constraint that only affects role_table.c.name and drop"},{"line_number":29,"context_line":"    # that constraint."},{"line_number":30,"context_line":"    #"},{"line_number":31,"context_line":"    # This is an idempotent change that reflects the fix to migration"},{"line_number":32,"context_line":"    # 88 if the role_name unique constraint was not named consistently."},{"line_number":33,"context_line":"    # NOTE(morganfainberg): the `role_name` unique constraint is not"},{"line_number":34,"context_line":"    # guaranteed to be named \u0027ixu_role_name\u0027, so we need to search for the"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_6fab471e","line":31,"updated":"2016-03-29 13:42:58.000000000","message":"I don\u0027t understand the point of this. According to the bug the migration failed so they\u0027ll still be at migration 88.","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c09438a1202426abb3a05b8d0ef156b2e1087aab","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    # correct constraint that only affects role_table.c.name and drop"},{"line_number":29,"context_line":"    # that constraint."},{"line_number":30,"context_line":"    #"},{"line_number":31,"context_line":"    # This is an idempotent change that reflects the fix to migration"},{"line_number":32,"context_line":"    # 88 if the role_name unique constraint was not named consistently."},{"line_number":33,"context_line":"    # NOTE(morganfainberg): the `role_name` unique constraint is not"},{"line_number":34,"context_line":"    # guaranteed to be named \u0027ixu_role_name\u0027, so we need to search for the"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_30efe7e9","line":31,"in_reply_to":"ba0121b8_0d273013","updated":"2016-03-29 15:00:21.000000000","message":"Put that in a comment in the code so we have a record of why it was done this way.","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"},{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"9e42e1afbfe4da9dff9ad3af0a46a956affc9730","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    # correct constraint that only affects role_table.c.name and drop"},{"line_number":29,"context_line":"    # that constraint."},{"line_number":30,"context_line":"    #"},{"line_number":31,"context_line":"    # This is an idempotent change that reflects the fix to migration"},{"line_number":32,"context_line":"    # 88 if the role_name unique constraint was not named consistently."},{"line_number":33,"context_line":"    # NOTE(morganfainberg): the `role_name` unique constraint is not"},{"line_number":34,"context_line":"    # guaranteed to be named \u0027ixu_role_name\u0027, so we need to search for the"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_0d273013","line":31,"in_reply_to":"ba0121b8_6fab471e","updated":"2016-03-29 14:50:19.000000000","message":"In my case I did some manual intervention so I could move forward with the migration.  I don\u0027t think it hurts to run a second time though.","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"a0f7e23592135aee0dea622634143c09fb3fe76d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    # 88 if the role_name unique constraint was not named consistently and"},{"line_number":33,"context_line":"    # someone manually fixed the migrations / db without dropping the"},{"line_number":34,"context_line":"    # old constraint."},{"line_number":35,"context_line":"    # NOTE(morganfainberg): the `role_name` unique constraint is not"},{"line_number":36,"context_line":"    # guaranteed to be a fixed name, such as \u0027ixu_role_name`, so we need to"},{"line_number":37,"context_line":"    # search for the correct constraint that only affects role_table.c.name"},{"line_number":38,"context_line":"    # and drop that constraint."},{"line_number":39,"context_line":"    to_drop \u003d None"},{"line_number":40,"context_line":"    if migrate_engine.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":41,"context_line":"        for c in role_table.indexes:"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba0121b8_f7ccb78a","line":38,"range":{"start_line":35,"start_character":0,"end_line":38,"end_character":31},"updated":"2016-03-31 18:36:33.000000000","message":"duplicated with the above","commit_id":"243ba563ec78d02c53b3deaa352d8a3c28c275f5"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"f146ddb85e4ef585cb040528cdbdb9b044a5ba17","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    # someone manually fixed the migrations / db without dropping the"},{"line_number":34,"context_line":"    # old constraint."},{"line_number":35,"context_line":"    to_drop \u003d None"},{"line_number":36,"context_line":"    if migrate_engine.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":37,"context_line":"        for c in role_table.indexes:"},{"line_number":38,"context_line":"            if (c.unique and len(c.columns) \u003d\u003d 1 and"},{"line_number":39,"context_line":"                    _ROLE_NAME_COLUMN_NAME in c.columns):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_dc43926a","line":36,"range":{"start_line":36,"start_character":4,"end_line":36,"end_character":6},"updated":"2016-03-31 21:08:42.000000000","message":"Rather than duplicating this code, why not add a new method here (keystone.common.sql.migration_helpers) and reuse","commit_id":"9e81843719dab3c66d89adf100bb3e1d5c9cedca"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"32e257307d6aeb36e8fa5d0533078d2a805f502b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    # someone manually fixed the migrations / db without dropping the"},{"line_number":34,"context_line":"    # old constraint."},{"line_number":35,"context_line":"    to_drop \u003d None"},{"line_number":36,"context_line":"    if migrate_engine.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":37,"context_line":"        for c in role_table.indexes:"},{"line_number":38,"context_line":"            if (c.unique and len(c.columns) \u003d\u003d 1 and"},{"line_number":39,"context_line":"                    _ROLE_NAME_COLUMN_NAME in c.columns):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_65110a04","line":36,"range":{"start_line":36,"start_character":4,"end_line":36,"end_character":6},"in_reply_to":"ba0121b8_dc43926a","updated":"2016-03-31 22:39:24.000000000","message":"that\u0027s something we want to avoid, we don\u0027t need to create any more dependencies in the migrations, they should be simple.\n\nthis was a very rare case that we hopefully shouldn\u0027t hit again","commit_id":"9e81843719dab3c66d89adf100bb3e1d5c9cedca"}],"keystone/common/sql/migrate_repo/versions/101_drop_role_name_constraint.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"f1adbcc9fc7b98d4efe0fd43b7d1c02f3b52ec6b","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    # correct constraint that only affects role_table.c.name and drop"},{"line_number":29,"context_line":"    # that constraint."},{"line_number":30,"context_line":"    #"},{"line_number":31,"context_line":"    # This is an idempotent change that reflects the fix to migration"},{"line_number":32,"context_line":"    # 88 if the role_name unique constraint was not named consistently."},{"line_number":33,"context_line":"    # This is a copy of migration 96 to catch any/all deployments that"},{"line_number":34,"context_line":"    # are close to master. migration 96 will be backported to"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_6f306702","line":31,"updated":"2016-03-29 13:42:58.000000000","message":"Again, I don\u0027t see the point of this. The failure happened in migration 88 so now they\u0027re stuck there.","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"},{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"9e42e1afbfe4da9dff9ad3af0a46a956affc9730","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    # correct constraint that only affects role_table.c.name and drop"},{"line_number":29,"context_line":"    # that constraint."},{"line_number":30,"context_line":"    #"},{"line_number":31,"context_line":"    # This is an idempotent change that reflects the fix to migration"},{"line_number":32,"context_line":"    # 88 if the role_name unique constraint was not named consistently."},{"line_number":33,"context_line":"    # This is a copy of migration 96 to catch any/all deployments that"},{"line_number":34,"context_line":"    # are close to master. migration 96 will be backported to"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_8d606037","line":31,"in_reply_to":"ba0121b8_6f306702","updated":"2016-03-29 14:50:19.000000000","message":"Same, I manually moved past it.  Don\u0027t see the harm in doing this twice.","commit_id":"a5c2c41cafa9f3a23ba98a00382d8130b9905bd5"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"a0f7e23592135aee0dea622634143c09fb3fe76d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    # This is a copy of migration 96 to catch any/all deployments that"},{"line_number":36,"context_line":"    # are close to master. migration 96 will be backported to"},{"line_number":37,"context_line":"    # stable/mitaka."},{"line_number":38,"context_line":"    # NOTE(morganfainberg): the `role_name` unique constraint is not"},{"line_number":39,"context_line":"    # guaranteed to be a fixed name, such as \u0027ixu_role_name`, so we need to"},{"line_number":40,"context_line":"    # search for the correct constraint that only affects role_table.c.name"},{"line_number":41,"context_line":"    # and drop that constraint."},{"line_number":42,"context_line":"    to_drop \u003d None"},{"line_number":43,"context_line":"    if migrate_engine.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":44,"context_line":"        for c in role_table.indexes:"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba0121b8_37c3cf58","line":41,"range":{"start_line":38,"start_character":0,"end_line":41,"end_character":31},"updated":"2016-03-31 18:36:33.000000000","message":"duplicated with the above","commit_id":"243ba563ec78d02c53b3deaa352d8a3c28c275f5"}],"keystone/tests/unit/test_sql_upgrade.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"03aee5b103438e6f66defb70ef3ddb4bb864617b","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        return index_name in [idx.name for idx in table.indexes]"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"    def does_constraint_exist(self, table_name, constraint_name):"},{"line_number":445,"context_line":"        meta \u003d sqlalchemy.MetaData(bind\u003dself.engine)"},{"line_number":446,"context_line":"        table \u003d sqlalchemy.Table(table_name, meta, autoload\u003dTrue)"},{"line_number":447,"context_line":"        return constraint_name in [con.name for con in table.constraints]"},{"line_number":448,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"ba0121b8_84342efc","line":445,"updated":"2016-03-31 17:39:11.000000000","message":"this should be able to use self.meta (same for all uses of meta)","commit_id":"2bd010dbc5c917ab37a5c73e48f70d27c5235089"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"03aee5b103438e6f66defb70ef3ddb4bb864617b","unresolved":false,"context_lines":[{"line_number":1055,"context_line":""},{"line_number":1056,"context_line":"    def test_migration_88_drops_unique_constraint(self):"},{"line_number":1057,"context_line":"        self.upgrade(87)"},{"line_number":1058,"context_line":"        if self.engine.name \u003d\u003d \"mysql\":"},{"line_number":1059,"context_line":"            self.assertTrue(self.does_index_exist(\u0027role\u0027, \u0027ixu_role_name\u0027))"},{"line_number":1060,"context_line":"        else:"},{"line_number":1061,"context_line":"            self.assertTrue(self.does_constraint_exist(\u0027role\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba0121b8_2401e206","line":1058,"updated":"2016-03-31 17:39:11.000000000","message":"use \u0027 for strings consistently (applies to all these changes)","commit_id":"2bd010dbc5c917ab37a5c73e48f70d27c5235089"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"03aee5b103438e6f66defb70ef3ddb4bb864617b","unresolved":false,"context_lines":[{"line_number":1069,"context_line":""},{"line_number":1070,"context_line":"    def test_migration_88_inconsistent_constraint_name(self):"},{"line_number":1071,"context_line":"        self.upgrade(87)"},{"line_number":1072,"context_line":"        self._drop_unique_constraint_to_role_name(\u0027ixu_role_name\u0027)"},{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"        constraint_name \u003d uuid.uuid4().hex"},{"line_number":1075,"context_line":"        self._add_unique_constraint_to_role_name("}],"source_content_type":"text/x-python","patch_set":14,"id":"ba0121b8_3f1d6b66","line":1072,"updated":"2016-03-31 17:39:11.000000000","message":"no argument needed since it has a default.","commit_id":"2bd010dbc5c917ab37a5c73e48f70d27c5235089"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"03aee5b103438e6f66defb70ef3ddb4bb864617b","unresolved":false,"context_lines":[{"line_number":1082,"context_line":"            self.assertTrue(self.does_constraint_exist(\u0027role\u0027,"},{"line_number":1083,"context_line":"                                                       constraint_name))"},{"line_number":1084,"context_line":"            self.assertFalse(self.does_constraint_exist(\u0027role\u0027,"},{"line_number":1085,"context_line":"                                                        \u0027ixu_role_name\u0027))"},{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"        self.upgrade(88)"},{"line_number":1088,"context_line":"        if self.engine.name \u003d\u003d \"mysql\":"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba0121b8_5f53ff16","line":1085,"updated":"2016-03-31 17:39:11.000000000","message":"no need to assert these things since the operations were just done.","commit_id":"2bd010dbc5c917ab37a5c73e48f70d27c5235089"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"03aee5b103438e6f66defb70ef3ddb4bb864617b","unresolved":false,"context_lines":[{"line_number":1115,"context_line":"            self.assertFalse(self.does_index_exist(\u0027role\u0027, \u0027ixu_role_name\u0027))"},{"line_number":1116,"context_line":"        else:"},{"line_number":1117,"context_line":"            self.assertFalse(self.does_constraint_exist(\u0027role\u0027,"},{"line_number":1118,"context_line":"                                                        \u0027ixu_role_name\u0027))"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"        self._add_unique_constraint_to_role_name("},{"line_number":1121,"context_line":"            constraint_name\u003d\u0027ixu_role_name\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba0121b8_df66efeb","line":1118,"updated":"2016-03-31 17:39:11.000000000","message":"the previous tests already showed this to be the case.","commit_id":"2bd010dbc5c917ab37a5c73e48f70d27c5235089"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"638ef0a67dc4511773aff36e33b2000e5d4eef84","unresolved":false,"context_lines":[{"line_number":1033,"context_line":"        # assert id column is an integer (after)"},{"line_number":1034,"context_line":"        self.assertIsInstance(revocation_event_table.c.id.type, sql.Integer)"},{"line_number":1035,"context_line":""},{"line_number":1036,"context_line":"    # The tests below check the role name constraint has been dropped."},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"    # These tests are being added in the Newton release of OpenStack, as well"},{"line_number":1039,"context_line":"    # as the fix of migration 88 and the new migrations 96 and 101."}],"source_content_type":"text/x-python","patch_set":15,"id":"ba0121b8_4a1dff64","line":1036,"updated":"2016-03-31 18:02:39.000000000","message":"This isn\u0027t going to work since new tests are going to be added to this class and we\u0027re not going to go looking for this comment so things will get out of date.\n\nThese tests could be gathered in a separate test class to make the documentation work.\n\nOtherwise, just drop the comments since it\u0027s excessive. Put them in the commit message.","commit_id":"a268ae5695680c8d19007d7b263ca608db5e6753"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"638ef0a67dc4511773aff36e33b2000e5d4eef84","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"    # have been run. This way, a new idempotent migration with number 101 is"},{"line_number":1061,"context_line":"    # available."},{"line_number":1062,"context_line":""},{"line_number":1063,"context_line":"    ROLE_NAME_CONSTRAINT \u003d \u0027ixu_role_name\u0027"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"    def _add_unique_constraint_to_role_name("},{"line_number":1066,"context_line":"            self, constraint_name\u003dROLE_NAME_CONSTRAINT):"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba0121b8_eaadf3e9","line":1063,"updated":"2016-03-31 18:02:39.000000000","message":"need to put the migration version on the name since it\u0027s not going to be the role name constraint after 88, so suggest call it ROLE_NAME_CONSTRAINT_PRE_88.","commit_id":"a268ae5695680c8d19007d7b263ca608db5e6753"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"638ef0a67dc4511773aff36e33b2000e5d4eef84","unresolved":false,"context_lines":[{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"    def _add_unique_constraint_to_role_name("},{"line_number":1066,"context_line":"            self, constraint_name\u003dROLE_NAME_CONSTRAINT):"},{"line_number":1067,"context_line":"        meta \u003d sqlalchemy.MetaData()"},{"line_number":1068,"context_line":"        meta.bind \u003d self.engine"},{"line_number":1069,"context_line":"        role_table \u003d sqlalchemy.Table(\u0027role\u0027, meta, autoload\u003dTrue)"},{"line_number":1070,"context_line":"        migrate.UniqueConstraint(role_table.c.name,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba0121b8_8a3a7797","line":1067,"updated":"2016-03-31 18:02:39.000000000","message":"no need for a new meta, use self.meta.","commit_id":"a268ae5695680c8d19007d7b263ca608db5e6753"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"638ef0a67dc4511773aff36e33b2000e5d4eef84","unresolved":false,"context_lines":[{"line_number":1070,"context_line":"        migrate.UniqueConstraint(role_table.c.name,"},{"line_number":1071,"context_line":"                                 name\u003dconstraint_name).create()"},{"line_number":1072,"context_line":""},{"line_number":1073,"context_line":"    def _drop_unique_constraint_to_role_name("},{"line_number":1074,"context_line":"            self, constraint_name\u003dROLE_NAME_CONSTRAINT):"},{"line_number":1075,"context_line":"        meta \u003d sqlalchemy.MetaData()"},{"line_number":1076,"context_line":"        meta.bind \u003d self.engine"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba0121b8_caaf4f7b","line":1073,"range":{"start_line":1073,"start_character":32,"end_line":1073,"end_character":34},"updated":"2016-03-31 18:02:39.000000000","message":"this should be \"on\"","commit_id":"a268ae5695680c8d19007d7b263ca608db5e6753"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"638ef0a67dc4511773aff36e33b2000e5d4eef84","unresolved":false,"context_lines":[{"line_number":1078,"context_line":"        migrate.UniqueConstraint(role_table.c.name,"},{"line_number":1079,"context_line":"                                 name\u003d\u0027ixu_role_name\u0027).drop()"},{"line_number":1080,"context_line":""},{"line_number":1081,"context_line":"    def _check_unique_constraint_to_role_name("},{"line_number":1082,"context_line":"            self, constraint_name\u003dROLE_NAME_CONSTRAINT, contains\u003dTrue):"},{"line_number":1083,"context_line":"        inspector \u003d inspect(self.engine)"},{"line_number":1084,"context_line":"        constraints \u003d inspector.get_unique_constraints(\u0027role\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba0121b8_aab2dbe2","line":1081,"range":{"start_line":1081,"start_character":33,"end_line":1081,"end_character":35},"updated":"2016-03-31 18:02:39.000000000","message":"this should be \"on\"","commit_id":"a268ae5695680c8d19007d7b263ca608db5e6753"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"638ef0a67dc4511773aff36e33b2000e5d4eef84","unresolved":false,"context_lines":[{"line_number":1081,"context_line":"    def _check_unique_constraint_to_role_name("},{"line_number":1082,"context_line":"            self, constraint_name\u003dROLE_NAME_CONSTRAINT, contains\u003dTrue):"},{"line_number":1083,"context_line":"        inspector \u003d inspect(self.engine)"},{"line_number":1084,"context_line":"        constraints \u003d inspector.get_unique_constraints(\u0027role\u0027)"},{"line_number":1085,"context_line":"        constraint_names \u003d [constraint[\u0027name\u0027] for constraint in constraints]"},{"line_number":1086,"context_line":"        if contains:"},{"line_number":1087,"context_line":"            self.assertIn(constraint_name, constraint_names)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba0121b8_aa113b06","line":1084,"updated":"2016-03-31 18:02:39.000000000","message":"give a name to the \u0027role\u0027 argument so readers know what it\u0027s intended for.","commit_id":"a268ae5695680c8d19007d7b263ca608db5e6753"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"638ef0a67dc4511773aff36e33b2000e5d4eef84","unresolved":false,"context_lines":[{"line_number":1105,"context_line":"        self._drop_unique_constraint_to_role_name()"},{"line_number":1106,"context_line":"        self._add_unique_constraint_to_role_name("},{"line_number":1107,"context_line":"            constraint_name\u003dconstraint_name)"},{"line_number":1108,"context_line":"        self._check_unique_constraint_to_role_name(contains\u003dFalse)"},{"line_number":1109,"context_line":"        self._check_unique_constraint_to_role_name("},{"line_number":1110,"context_line":"            constraint_name\u003dconstraint_name)"},{"line_number":1111,"context_line":"        self.upgrade(88)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba0121b8_ea933359","line":1108,"updated":"2016-03-31 18:02:39.000000000","message":"There\u0027s no need to verify this -- we can assume that _drop_unique_constraint_to_role_name() did its job.\n\nThis applies to all these extra checks.","commit_id":"a268ae5695680c8d19007d7b263ca608db5e6753"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"638ef0a67dc4511773aff36e33b2000e5d4eef84","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"        constraint_name \u003d uuid.uuid4().hex"},{"line_number":1138,"context_line":""},{"line_number":1139,"context_line":"        self.upgrade(95)"},{"line_number":1140,"context_line":"        self._check_unique_constraint_to_role_name(contains\u003dFalse)"},{"line_number":1141,"context_line":"        self._add_unique_constraint_to_role_name(constraint_name)"},{"line_number":1142,"context_line":"        self._check_unique_constraint_to_role_name(constraint_name)"},{"line_number":1143,"context_line":"        self.upgrade(96)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba0121b8_0afca76e","line":1140,"updated":"2016-03-31 18:02:39.000000000","message":"no need to check this every time, it was already verified in other tests.","commit_id":"a268ae5695680c8d19007d7b263ca608db5e6753"}]}
