)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"910f64b4f069d9f970791b709c59c669773340f2","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"KeyPair name is not forced to be not null. Since the API enforces"},{"line_number":10,"context_line":"that name is not null, the database schema and model are now"},{"line_number":11,"context_line":"updated to enforce this."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I1088cc79f4998d3b6609891adbb0479381297ec4"},{"line_number":14,"context_line":"Related-Bug: #1403544"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_3524d3b1","line":11,"updated":"2015-03-16 21:57:40.000000000","message":"if API layer already do that , why we need this \ndb migration to enforce it?","commit_id":"622284a982dbb4b59cb737d8d909f1017412cd51"},{"author":{"_account_id":12114,"name":"Kent Wang","email":"kent.wang@intel.com","username":"k.wang"},"change_message_id":"f12643356a9b3b3368b8805f1154a46b010eeae4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"KeyPair name is not forced to be not null. Since the API enforces"},{"line_number":10,"context_line":"that name is not null, the database schema and model are now"},{"line_number":11,"context_line":"updated to enforce this."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I1088cc79f4998d3b6609891adbb0479381297ec4"},{"line_number":14,"context_line":"Related-Bug: #1403544"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_7ccab31b","line":11,"in_reply_to":"9a80dd14_3524d3b1","updated":"2015-03-16 23:22:56.000000000","message":"Hi Thanks for the comment. There was some talk on irc and the bug report that this could be an integrity concern. And DB/API mismatch might be good for a fix :)","commit_id":"622284a982dbb4b59cb737d8d909f1017412cd51"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6c7a61c33ef80573d99ee6ea90fe1d736692b56","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I1088cc79f4998d3b6609891adbb0479381297ec4"},{"line_number":13,"context_line":"Related-Bug: #1403544"},{"line_number":14,"context_line":"Closes-Bug: #1189981"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"1a6ced46_76f1dacc","line":14,"updated":"2015-03-23 15:12:52.000000000","message":"Heh, I was called out in this one, I totally forgot about this.","commit_id":"dd52617232c0915c85ca227e975c759c20e41b75"}],"nova/db/sqlalchemy/migrate_repo/versions/279_add_nullable_false_to_keypairs_name.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"910f64b4f069d9f970791b709c59c669773340f2","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    # Note: Since we are altering name field, this constraint needs to be"},{"line_number":43,"context_line":"    # dropped and readded. It was first added in 216_havana.py so no need"},{"line_number":44,"context_line":"    # to remove constraint on downgrade."},{"line_number":45,"context_line":"    UniqueConstraint(\u0027user_id\u0027, \u0027name\u0027, \u0027deleted\u0027, table\u003dkey_pairs,"},{"line_number":46,"context_line":"                     name\u003d\u0027uniq_key_pairs0user_id0name0deleted\u0027).drop()"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_3a48408a","line":44,"updated":"2015-03-16 21:57:40.000000000","message":"question:no need to remove constraint ?but you do drop and create?","commit_id":"622284a982dbb4b59cb737d8d909f1017412cd51"},{"author":{"_account_id":12114,"name":"Kent Wang","email":"kent.wang@intel.com","username":"k.wang"},"change_message_id":"f12643356a9b3b3368b8805f1154a46b010eeae4","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    # Note: Since we are altering name field, this constraint needs to be"},{"line_number":43,"context_line":"    # dropped and readded. It was first added in 216_havana.py so no need"},{"line_number":44,"context_line":"    # to remove constraint on downgrade."},{"line_number":45,"context_line":"    UniqueConstraint(\u0027user_id\u0027, \u0027name\u0027, \u0027deleted\u0027, table\u003dkey_pairs,"},{"line_number":46,"context_line":"                     name\u003d\u0027uniq_key_pairs0user_id0name0deleted\u0027).drop()"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ff0db536","line":44,"in_reply_to":"9a80dd14_3a48408a","updated":"2015-03-16 23:22:56.000000000","message":"Thanks for the question. I had to drop this specific constraint since this constraint was for \u0027name\u0027 field. But I\u0027m altering the name field! If I didn\u0027t drop first, there would be constraint errors since we are altering the field","commit_id":"622284a982dbb4b59cb737d8d909f1017412cd51"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"2c2e0ed777de1aa9c98c0b478684e972194303f4","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    key_pairs \u003d Table(\u0027key_pairs\u0027, meta, autoload\u003dTrue)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    # Note: Since we are altering name field, this constraint needs to be"},{"line_number":26,"context_line":"    # dropped and readded. It was first added in 216_havana.py so no need"},{"line_number":27,"context_line":"    # to remove constraint on downgrade."},{"line_number":28,"context_line":"    UniqueConstraint(\u0027user_id\u0027, \u0027name\u0027, \u0027deleted\u0027, table\u003dkey_pairs,"},{"line_number":29,"context_line":"                     name\u003d\u0027uniq_key_pairs0user_id0name0deleted\u0027).drop()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_974a7481","line":26,"updated":"2015-03-18 21:25:59.000000000","message":"/s/readed/read","commit_id":"b6233b4fa71cbe72647499c8d08a1790280fafb7"},{"author":{"_account_id":12114,"name":"Kent Wang","email":"kent.wang@intel.com","username":"k.wang"},"change_message_id":"1c753e9b20f411f156f03b280119b6605e8f2c91","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    key_pairs \u003d Table(\u0027key_pairs\u0027, meta, autoload\u003dTrue)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    # Note: Since we are altering name field, this constraint needs to be"},{"line_number":26,"context_line":"    # dropped and readded. It was first added in 216_havana.py so no need"},{"line_number":27,"context_line":"    # to remove constraint on downgrade."},{"line_number":28,"context_line":"    UniqueConstraint(\u0027user_id\u0027, \u0027name\u0027, \u0027deleted\u0027, table\u003dkey_pairs,"},{"line_number":29,"context_line":"                     name\u003d\u0027uniq_key_pairs0user_id0name0deleted\u0027).drop()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_dd224b53","line":26,"in_reply_to":"9a80dd14_974a7481","updated":"2015-03-18 21:54:21.000000000","message":"thanks will change to \u0027re-added\u0027","commit_id":"b6233b4fa71cbe72647499c8d08a1790280fafb7"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"2c2e0ed777de1aa9c98c0b478684e972194303f4","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    key_pairs \u003d Table(\u0027key_pairs\u0027, meta, autoload\u003dTrue)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    # Note: Since we are altering name field, this constraint needs to be"},{"line_number":43,"context_line":"    # dropped and readded. It was first added in 216_havana.py so no need"},{"line_number":44,"context_line":"    # to remove constraint on downgrade."},{"line_number":45,"context_line":"    UniqueConstraint(\u0027user_id\u0027, \u0027name\u0027, \u0027deleted\u0027, table\u003dkey_pairs,"},{"line_number":46,"context_line":"                     name\u003d\u0027uniq_key_pairs0user_id0name0deleted\u0027).drop()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_f745706f","line":43,"updated":"2015-03-18 21:25:59.000000000","message":"/s/readed/read","commit_id":"b6233b4fa71cbe72647499c8d08a1790280fafb7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e8ce3d759798c2abf3f798c454cdf231d6564ace","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    # constraint. It was first added in 216_havana.py so no need to remove"},{"line_number":28,"context_line":"    # constraint on downgrade."},{"line_number":29,"context_line":"    UniqueConstraint(\u0027user_id\u0027, \u0027name\u0027, \u0027deleted\u0027, table\u003dkey_pairs,"},{"line_number":30,"context_line":"                     name\u003d\u0027uniq_key_pairs0user_id0name0deleted\u0027).drop()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    key_pairs.c.name.alter(nullable\u003dFalse)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_c5788880","line":30,"updated":"2015-03-19 17:19:41.000000000","message":"Are there any foreign key constraints on any of the columns in this UC in this table?","commit_id":"983456ee577b61d094eb590fe53b3feab5fa7cb0"},{"author":{"_account_id":12114,"name":"Kent Wang","email":"kent.wang@intel.com","username":"k.wang"},"change_message_id":"d691f2f31600ac01a925d5d6d7fcd1e716a6b38f","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    # constraint. It was first added in 216_havana.py so no need to remove"},{"line_number":28,"context_line":"    # constraint on downgrade."},{"line_number":29,"context_line":"    UniqueConstraint(\u0027user_id\u0027, \u0027name\u0027, \u0027deleted\u0027, table\u003dkey_pairs,"},{"line_number":30,"context_line":"                     name\u003d\u0027uniq_key_pairs0user_id0name0deleted\u0027).drop()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    key_pairs.c.name.alter(nullable\u003dFalse)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_58370eb0","line":30,"in_reply_to":"9a80dd14_c5788880","updated":"2015-03-19 22:58:43.000000000","message":"I\u0027ve checked and there are none. Would having a foreign key on any of these columns affect this code? I\u0027m dropping the uniqueness constraint.","commit_id":"983456ee577b61d094eb590fe53b3feab5fa7cb0"}],"nova/db/sqlalchemy/migrate_repo/versions/280_add_nullable_false_to_keypairs_name.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6c7a61c33ef80573d99ee6ea90fe1d736692b56","unresolved":false,"context_lines":[{"line_number":20,"context_line":"def upgrade(migrate_engine):"},{"line_number":21,"context_line":"    \"\"\"Function enforces non-null value for keypairs name field.\"\"\""},{"line_number":22,"context_line":"    meta \u003d MetaData(bind\u003dmigrate_engine)"},{"line_number":23,"context_line":"    key_pairs \u003d Table(\u0027key_pairs\u0027, meta, autoload\u003dTrue)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    # Note: Since we are altering name field, this constraint on name needs to"},{"line_number":26,"context_line":"    # first be dropped before we can alter name. We then re-create the same"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_f6ab0a87","line":23,"updated":"2015-03-23 15:12:52.000000000","message":"I assume we don\u0027t care about shadow_key_pairs since we don\u0027t enforce the model (or UniqueConstraints) in shadow tables.","commit_id":"dd52617232c0915c85ca227e975c759c20e41b75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6c7a61c33ef80573d99ee6ea90fe1d736692b56","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    # Note: Since we are altering name field, this constraint on name needs to"},{"line_number":26,"context_line":"    # first be dropped before we can alter name. We then re-create the same"},{"line_number":27,"context_line":"    # constraint. It was first added in 216_havana.py so no need to remove"},{"line_number":28,"context_line":"    # constraint on downgrade."},{"line_number":29,"context_line":"    UniqueConstraint(\u0027user_id\u0027, \u0027name\u0027, \u0027deleted\u0027, table\u003dkey_pairs,"},{"line_number":30,"context_line":"                     name\u003d\u0027uniq_key_pairs0user_id0name0deleted\u0027).drop()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_76c47a40","line":27,"updated":"2015-03-23 15:12:52.000000000","message":"The last sentence here is a bit confusing, to me at least, since the constraint is dropped on downgrade, but that\u0027s just to alter the column, like you\u0027re doing on upgrade.  I\u0027d probably omit this last sentence from the comment here and in downgrade.","commit_id":"dd52617232c0915c85ca227e975c759c20e41b75"}]}
