)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c87896d085a169ee3d0df05557d41e172760443f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"reliant on one another."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This commit removes the foreign key constraint from the user table and"},{"line_number":18,"context_line":"the identity_provider table. For the user table, the sqlalchemy model"},{"line_number":19,"context_line":"never reflected this schema so we don\u0027t need to change the model. For"},{"line_number":20,"context_line":"the identity_provider table, we need to update the model. In both cases,"},{"line_number":21,"context_line":"we already enforce, at the manager layer, the constraint that the"},{"line_number":22,"context_line":"domain_id needs to reference a real domain ID[1][2], so we do not need"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_2dc3518b","line":19,"range":{"start_line":18,"start_character":29,"end_line":19,"end_character":65},"updated":"2019-10-11 06:29:02.000000000","message":"I wonder why it isn\u0027t reflected as it was added [1]\n\n[1]https://github.com/openstack/keystone/blob/master/keystone/common/sql/expand_repo/versions/014_expand_add_domain_id_to_user_table.py#L140-L141","commit_id":"9e331e938ba77df7d70a869327717eda112c92d0"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"436ffb992a70677abb5de5686e1ecf68b678c258","unresolved":false,"context_lines":[{"line_number":15,"context_line":"reliant on one another."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This commit removes the foreign key constraint from the user table and"},{"line_number":18,"context_line":"the identity_provider table. For the user table, the sqlalchemy model"},{"line_number":19,"context_line":"never reflected this schema so we don\u0027t need to change the model. For"},{"line_number":20,"context_line":"the identity_provider table, we need to update the model. In both cases,"},{"line_number":21,"context_line":"we already enforce, at the manager layer, the constraint that the"},{"line_number":22,"context_line":"domain_id needs to reference a real domain ID[1][2], so we do not need"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_9e6e1ffe","line":19,"range":{"start_line":18,"start_character":29,"end_line":19,"end_character":65},"in_reply_to":"3fa7e38b_2dc3518b","updated":"2019-10-11 21:03:09.000000000","message":"I think it was just a mistake.","commit_id":"9e331e938ba77df7d70a869327717eda112c92d0"}],"keystone/common/sql/contract_repo/versions/072_drop_domain_id_fk.py":[{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c87896d085a169ee3d0df05557d41e172760443f","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    user \u003d sql.Table(\u0027user\u0027, meta, autoload\u003dTrue)"},{"line_number":26,"context_line":"    project \u003d sql.Table(\u0027project\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    fk_name \u003d ["},{"line_number":29,"context_line":"        c for c in user.constraints"},{"line_number":30,"context_line":"        if isinstance(c, sql.ForeignKeyConstraint)"},{"line_number":31,"context_line":"        and c.column_keys \u003d\u003d [\u0027domain_id\u0027]"},{"line_number":32,"context_line":"    ][0].name"},{"line_number":33,"context_line":"    fk_constraint \u003d migrate.ForeignKeyConstraint("},{"line_number":34,"context_line":"        columns\u003d[user.c.domain_id], refcolumns\u003d[project.c.id])"},{"line_number":35,"context_line":"    fk_constraint.name \u003d fk_name"},{"line_number":36,"context_line":"    fk_constraint.drop()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    identity_provider \u003d sql.Table(\u0027identity_provider\u0027, meta, autoload\u003dTrue)"},{"line_number":39,"context_line":"    fk_name \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_2d48312b","line":36,"range":{"start_line":28,"start_character":4,"end_line":36,"end_character":24},"updated":"2019-10-11 06:29:02.000000000","message":"Question: Do we really need this as domain.id isn\u0027t referenced to project.id foreign key[1] ?\n\n[1 https://github.com/openstack/keystone/blob/master/keystone/identity/backends/sql_model.py#L39]","commit_id":"9e331e938ba77df7d70a869327717eda112c92d0"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"436ffb992a70677abb5de5686e1ecf68b678c258","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    user \u003d sql.Table(\u0027user\u0027, meta, autoload\u003dTrue)"},{"line_number":26,"context_line":"    project \u003d sql.Table(\u0027project\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    fk_name \u003d ["},{"line_number":29,"context_line":"        c for c in user.constraints"},{"line_number":30,"context_line":"        if isinstance(c, sql.ForeignKeyConstraint)"},{"line_number":31,"context_line":"        and c.column_keys \u003d\u003d [\u0027domain_id\u0027]"},{"line_number":32,"context_line":"    ][0].name"},{"line_number":33,"context_line":"    fk_constraint \u003d migrate.ForeignKeyConstraint("},{"line_number":34,"context_line":"        columns\u003d[user.c.domain_id], refcolumns\u003d[project.c.id])"},{"line_number":35,"context_line":"    fk_constraint.name \u003d fk_name"},{"line_number":36,"context_line":"    fk_constraint.drop()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    identity_provider \u003d sql.Table(\u0027identity_provider\u0027, meta, autoload\u003dTrue)"},{"line_number":39,"context_line":"    fk_name \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_de1fb769","line":36,"range":{"start_line":28,"start_character":4,"end_line":36,"end_character":24},"in_reply_to":"3fa7e38b_2d48312b","updated":"2019-10-11 21:03:09.000000000","message":"You\u0027re conflating the sqlalchemy model with the actual table. If you go to your devstack and do \u0027show create table `user`\u0027 on the keystone database in mysql you will see the foreign key exists.\n\nThese schema migrations are imperative instructions that act on the database itself to bring it from one state to another. The sqlalchemy model is a declarative description of what the table is supposed to look like and acts as an interface between the database and the calling code.","commit_id":"9e331e938ba77df7d70a869327717eda112c92d0"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"079dcb8e1ff075abfc5bf391c1317e55248104e4","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    user \u003d sql.Table(\u0027user\u0027, meta, autoload\u003dTrue)"},{"line_number":26,"context_line":"    project \u003d sql.Table(\u0027project\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    fk_name \u003d ["},{"line_number":29,"context_line":"        c for c in user.constraints"},{"line_number":30,"context_line":"        if isinstance(c, sql.ForeignKeyConstraint)"},{"line_number":31,"context_line":"        and c.column_keys \u003d\u003d [\u0027domain_id\u0027]"},{"line_number":32,"context_line":"    ][0].name"},{"line_number":33,"context_line":"    fk_constraint \u003d migrate.ForeignKeyConstraint("},{"line_number":34,"context_line":"        columns\u003d[user.c.domain_id], refcolumns\u003d[project.c.id])"},{"line_number":35,"context_line":"    fk_constraint.name \u003d fk_name"},{"line_number":36,"context_line":"    fk_constraint.drop()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    identity_provider \u003d sql.Table(\u0027identity_provider\u0027, meta, autoload\u003dTrue)"},{"line_number":39,"context_line":"    fk_name \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_1c078dcc","line":36,"range":{"start_line":28,"start_character":4,"end_line":36,"end_character":24},"in_reply_to":"3fa7e38b_de1fb769","updated":"2019-10-14 06:44:12.000000000","message":"Ahhh. Makes sense. Thanks","commit_id":"9e331e938ba77df7d70a869327717eda112c92d0"}]}
