)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"e1ce5b6f4cf30746648e2708a984189ca32d67d2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"3ac371cc_935fc340","updated":"2016-08-16 03:57:01.000000000","message":"reference bug https://bugs.launchpad.net/keystone/+bug/1596500","commit_id":"16e7a746304cec9cacfde7b13ef2b2061787663b"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"704093de7e85c75aa97411a25c3b091a34b539ae","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add expand, data migration and contract logic to keystone-manage"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Partially Implements: blueprint manage-migration"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Ie68b463b7a3acbf39486d75026b80bf5dcbc5288"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"3ac371cc_89e639ae","line":10,"updated":"2016-08-17 03:43:05.000000000","message":"Closes-Bug: 1596500","commit_id":"8bb264df1f0936e9deaf293040d6b1c817702640"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"938d68031b43f1e30f2aaa21e6c8b8c59a5edc8f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add expand, data migration and contract logic to keystone-manage"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Partially Implements: blueprint manage-migration"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Ie68b463b7a3acbf39486d75026b80bf5dcbc5288"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"3ac371cc_00c4d35c","line":10,"in_reply_to":"3ac371cc_89e639ae","updated":"2016-08-17 08:46:05.000000000","message":"Done","commit_id":"8bb264df1f0936e9deaf293040d6b1c817702640"}],"keystone/common/sql/contract_repo/versions/001_make_password_create_at_non_nullable.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"08faaa4a2ab6e67c96c607bccf7c7689a9a59798","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import datetime"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import sqlalchemy as sql"},{"line_number":16,"context_line":"from sqlalchemy.sql.expression import null"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"# Migration 105 clean-up."}],"source_content_type":"text/x-python","patch_set":22,"id":"3ac371cc_8529c08c","line":16,"updated":"2016-08-17 22:31:00.000000000","message":"nit: import modules, not objects\n\n  from sqlalchemy.sql import expression","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"08faaa4a2ab6e67c96c607bccf7c7689a9a59798","unresolved":false,"context_lines":[{"line_number":21,"context_line":"# the create_at value set to the current date. We could solve this issue by"},{"line_number":22,"context_line":"# creating triggers in the expand phase, although given the actual migration"},{"line_number":23,"context_line":"# that caused this problem is in the legacy repo, there would always be a"},{"line_number":24,"context_line":"# chance that a row could have been created before the triggers were installed."},{"line_number":25,"context_line":"#"},{"line_number":26,"context_line":"# In addition, to avoid other errors during a multi-node migration it doesn\u0027t"},{"line_number":27,"context_line":"# set the created_at column to be non-nullable to match how the sql_model"}],"source_content_type":"text/x-python","patch_set":22,"id":"3ac371cc_2201e206","line":24,"updated":"2016-08-17 22:31:00.000000000","message":"But, if you created triggers in the expand, did another attempt to populate the column in the data migration phase, you\u0027ll guarantee that everything is populated by the time this script is run.","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"08faaa4a2ab6e67c96c607bccf7c7689a9a59798","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    password_table \u003d sql.Table(\u0027password\u0027, meta, autoload\u003dTrue)"},{"line_number":36,"context_line":"    values \u003d {\u0027created_at\u0027: datetime.datetime.utcnow()}"},{"line_number":37,"context_line":"    stmt \u003d password_table.update().where("},{"line_number":38,"context_line":"        password_table.c.created_at \u003d\u003d null()).values(values)"},{"line_number":39,"context_line":"    stmt.execute()"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"3ac371cc_859ee0b6","line":37,"updated":"2016-08-17 22:31:00.000000000","message":"We normally abbreviate this variable as \u0027q\u0027 for \u0027query\u0027","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"08faaa4a2ab6e67c96c607bccf7c7689a9a59798","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    password_table \u003d sql.Table(\u0027password\u0027, meta, autoload\u003dTrue)"},{"line_number":36,"context_line":"    values \u003d {\u0027created_at\u0027: datetime.datetime.utcnow()}"},{"line_number":37,"context_line":"    stmt \u003d password_table.update().where("},{"line_number":38,"context_line":"        password_table.c.created_at \u003d\u003d null()).values(values)"},{"line_number":39,"context_line":"    stmt.execute()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    password_table.c.created_at.alter(nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3ac371cc_657ac489","line":38,"updated":"2016-08-17 22:31:00.000000000","message":"This portion is really a data migration, not a contract step.\n\nAlso, based on the above change to imports:\n\n  expression.null()","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"b1214b7534c397ca36036c5088465f632bea666a","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    password_table \u003d sql.Table(\u0027password\u0027, meta, autoload\u003dTrue)"},{"line_number":36,"context_line":"    values \u003d {\u0027created_at\u0027: datetime.datetime.utcnow()}"},{"line_number":37,"context_line":"    stmt \u003d password_table.update().where("},{"line_number":38,"context_line":"        password_table.c.created_at \u003d\u003d null()).values(values)"},{"line_number":39,"context_line":"    stmt.execute()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    password_table.c.created_at.alter(nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3ac371cc_d0fd346f","line":38,"in_reply_to":"3ac371cc_657ac489","updated":"2016-08-17 22:42:42.000000000","message":"++ Lets use triggers and have a working example.","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"}],"keystone/common/sql/data_migration_repo/migrate.cfg":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ce38176123d6db7e3aa8dcb89b91b07dffb1f852","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[db_settings]"},{"line_number":2,"context_line":"# Used to identify which repository this database is versioned under."},{"line_number":3,"context_line":"# You can use the name of your project."},{"line_number":4,"context_line":"repository_id\u003dkeystone_data_migrate"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# The name of the database table used to track the schema version."},{"line_number":7,"context_line":"# This name shouldn\u0027t already be used by your project."}],"source_content_type":"text/x-ttcn-cfg","patch_set":24,"id":"3ac371cc_cc761805","line":4,"updated":"2016-08-18 13:51:11.000000000","message":"nit: keystone_migrate to be consistent with keystone_expand and keystone_contract?","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22cf34aa99e6eca7bd8f8c3de7d79684b19c540f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[db_settings]"},{"line_number":2,"context_line":"# Used to identify which repository this database is versioned under."},{"line_number":3,"context_line":"# You can use the name of your project."},{"line_number":4,"context_line":"repository_id\u003dkeystone_data_migrate"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# The name of the database table used to track the schema version."},{"line_number":7,"context_line":"# This name shouldn\u0027t already be used by your project."}],"source_content_type":"text/x-ttcn-cfg","patch_set":24,"id":"3ac371cc_f242bf0d","line":4,"in_reply_to":"3ac371cc_38c9e3ac","updated":"2016-08-18 15:56:57.000000000","message":"i think the pattern henry followed was:\n\n  start with keystone_ + folder name (contract/expand/data_migration) + drop _repo\n\n  keystone_contract\n  keystone_expand\n  keystone_data_migration","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"2be35a2ef435727714995b5b99e9d85da1759fdc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[db_settings]"},{"line_number":2,"context_line":"# Used to identify which repository this database is versioned under."},{"line_number":3,"context_line":"# You can use the name of your project."},{"line_number":4,"context_line":"repository_id\u003dkeystone_data_migrate"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# The name of the database table used to track the schema version."},{"line_number":7,"context_line":"# This name shouldn\u0027t already be used by your project."}],"source_content_type":"text/x-ttcn-cfg","patch_set":24,"id":"3ac371cc_38c9e3ac","line":4,"in_reply_to":"3ac371cc_cc761805","updated":"2016-08-18 14:12:23.000000000","message":"++","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"7b7671f2e6753fe7943df1ba54a128d5e1f12f1a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[db_settings]"},{"line_number":2,"context_line":"# Used to identify which repository this database is versioned under."},{"line_number":3,"context_line":"# You can use the name of your project."},{"line_number":4,"context_line":"repository_id\u003dkeystone_data_migrate"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# The name of the database table used to track the schema version."},{"line_number":7,"context_line":"# This name shouldn\u0027t already be used by your project."}],"source_content_type":"text/x-ttcn-cfg","patch_set":24,"id":"3ac371cc_0b40fe06","line":4,"in_reply_to":"3ac371cc_f242bf0d","updated":"2016-08-18 19:10:50.000000000","message":"++  ...and I\u0027m trying to make sure there isn\u0027t confusion between the old \"migrate_repo\" and the \"data_migration_repo\"","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"}],"keystone/common/sql/data_migration_repo/versions/001_data_initial_null_migration.py":[{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"2be35a2ef435727714995b5b99e9d85da1759fdc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"3ac371cc_b89e7360","line":19,"updated":"2016-08-18 14:12:23.000000000","message":"Do we need this file?  If so, why not 001_placeholder.py as we\u0027ve done in the past?","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"7b7671f2e6753fe7943df1ba54a128d5e1f12f1a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"3ac371cc_2bc05a7c","line":19,"in_reply_to":"3ac371cc_3211f752","updated":"2016-08-18 19:10:50.000000000","message":"...and as per the comment in the commit message, some of our helper functions don\u0027t handle empty repos well","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22cf34aa99e6eca7bd8f8c3de7d79684b19c540f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"3ac371cc_3211f752","line":19,"in_reply_to":"3ac371cc_b89e7360","updated":"2016-08-18 15:56:57.000000000","message":"i think \"null migration\" makes more sense than placeholder, since we won\u0027t be backporting anything so theres nothing to placehold","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"}],"keystone/common/sql/data_migration_repo/versions/001_make_password_create_at_non_nullable.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"704093de7e85c75aa97411a25c3b091a34b539ae","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# No data migration is required for the fix up of password date columns"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3ac371cc_e91b6dc8","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":71},"updated":"2016-08-17 03:43:05.000000000","message":"reference migration 105, maybe, meh","commit_id":"8bb264df1f0936e9deaf293040d6b1c817702640"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"938d68031b43f1e30f2aaa21e6c8b8c59a5edc8f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# No data migration is required for the fix up of password date columns"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3ac371cc_a0a97f92","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":71},"in_reply_to":"3ac371cc_e91b6dc8","updated":"2016-08-17 08:46:05.000000000","message":"Done","commit_id":"8bb264df1f0936e9deaf293040d6b1c817702640"}],"keystone/common/sql/expand_repo/versions/001_make_password_create_at_non_nullable.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"704093de7e85c75aa97411a25c3b091a34b539ae","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# The password date columns were added before the expand repo was created,"},{"line_number":14,"context_line":"# in migration 105 of the legacy main repo. Hence there is no work to do here."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3ac371cc_69865ddc","line":14,"range":{"start_line":14,"start_character":15,"end_line":14,"end_character":18},"updated":"2016-08-17 03:43:05.000000000","message":"see, you did it here ;)","commit_id":"8bb264df1f0936e9deaf293040d6b1c817702640"}],"keystone/common/sql/migrate_repo_contract/Newton/versions/001_add_password_date_columns.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"ff4f2395ac0868ed1fb2e6596adf8e0eab597343","unresolved":false,"context_lines":[{"line_number":15,"context_line":"# Migration 105 clean-up."},{"line_number":16,"context_line":"# In a multi-node migration, this could leave the created_at attribute"},{"line_number":17,"context_line":"# unset. In addition, to avoid other errors during a multi-node"},{"line_number":18,"context_line":"# migration it doesn\u0027t set the created_at column to be non-nullable to"},{"line_number":19,"context_line":"# match how the sql_model is defined."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_ab2a5f2a","line":18,"range":{"start_line":18,"start_character":31,"end_line":18,"end_character":41},"updated":"2016-08-03 09:34:20.000000000","message":"created_at or password?","commit_id":"72c872adc2d5cd915517cca31f24e150a95bd760"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"e666abe780e703b0e273ceed93ece724d62d6b70","unresolved":false,"context_lines":[{"line_number":15,"context_line":"# Migration 105 clean-up."},{"line_number":16,"context_line":"# In a multi-node migration, this could leave the created_at attribute"},{"line_number":17,"context_line":"# unset. In addition, to avoid other errors during a multi-node"},{"line_number":18,"context_line":"# migration it doesn\u0027t set the created_at column to be non-nullable to"},{"line_number":19,"context_line":"# match how the sql_model is defined."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_7d7914fc","line":18,"range":{"start_line":18,"start_character":31,"end_line":18,"end_character":41},"in_reply_to":"bacf61ea_ab2a5f2a","updated":"2016-08-04 07:09:32.000000000","message":"it is created_at","commit_id":"72c872adc2d5cd915517cca31f24e150a95bd760"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"ff4f2395ac0868ed1fb2e6596adf8e0eab597343","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# In a multi-node migration, this could leave the created_at attribute"},{"line_number":17,"context_line":"# unset. In addition, to avoid other errors during a multi-node"},{"line_number":18,"context_line":"# migration it doesn\u0027t set the created_at column to be non-nullable to"},{"line_number":19,"context_line":"# match how the sql_model is defined."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_2bc14f2f","line":19,"range":{"start_line":19,"start_character":16,"end_line":19,"end_character":25},"updated":"2016-08-03 09:34:20.000000000","message":"sql_model for password is nullable I think.","commit_id":"72c872adc2d5cd915517cca31f24e150a95bd760"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"ff4f2395ac0868ed1fb2e6596adf8e0eab597343","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    password_table \u003d sql.Table(\u0027password\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":"    password_table.c.password.alter(nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_a548ce88","line":27,"range":{"start_line":27,"start_character":21,"end_line":27,"end_character":29},"updated":"2016-08-03 09:34:20.000000000","message":"Have we decide that password is not nullable? If so, why it\u0027s here instead of Ocata?","commit_id":"72c872adc2d5cd915517cca31f24e150a95bd760"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"e666abe780e703b0e273ceed93ece724d62d6b70","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    password_table \u003d sql.Table(\u0027password\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":"    password_table.c.password.alter(nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_3d215cfc","line":27,"range":{"start_line":27,"start_character":21,"end_line":27,"end_character":29},"in_reply_to":"bacf61ea_a548ce88","updated":"2016-08-04 07:09:32.000000000","message":"Good catch....this should be \"created_at\"","commit_id":"72c872adc2d5cd915517cca31f24e150a95bd760"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0bb02d118e6428d56a61af195a85f50715962408","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import sqlalchemy as sql"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# Migration 105 clean-up."},{"line_number":16,"context_line":"# In a multi-node migration, this could leave the created_at attribute"},{"line_number":17,"context_line":"# unset. In addition, to avoid other errors during a multi-node"},{"line_number":18,"context_line":"# migration it doesn\u0027t set the created_at column to be non-nullable to"}],"source_content_type":"text/x-python","patch_set":5,"id":"bacf61ea_2659d3fd","line":15,"range":{"start_line":15,"start_character":12,"end_line":15,"end_character":24},"updated":"2016-08-07 07:33:42.000000000","message":"I am wondering why it is haven\u0027t set the `created_at` to be non-nullable with a default value as the last step in 105 :)","commit_id":"f618b3089ce9652763d730ab71d7e900b0001075"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"281181a49ff90fb08d16b2e5486c0049b123a0cd","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import sqlalchemy as sql"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# Migration 105 clean-up."},{"line_number":16,"context_line":"# In a multi-node migration, this could leave the created_at attribute"},{"line_number":17,"context_line":"# unset. In addition, to avoid other errors during a multi-node"},{"line_number":18,"context_line":"# migration it doesn\u0027t set the created_at column to be non-nullable to"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_1e32c6f1","line":15,"range":{"start_line":15,"start_character":12,"end_line":15,"end_character":24},"in_reply_to":"9ad45d7e_18730382","updated":"2016-08-09 06:51:54.000000000","message":"Conceptually agreed....except Ron said he could not find a way of having a reliable server_default that set the date to now()....hence ending up with the code we have.","commit_id":"f618b3089ce9652763d730ab71d7e900b0001075"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"6c74b1666e0d403c1911d91edc6993b31c214d20","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import sqlalchemy as sql"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# Migration 105 clean-up."},{"line_number":16,"context_line":"# In a multi-node migration, this could leave the created_at attribute"},{"line_number":17,"context_line":"# unset. In addition, to avoid other errors during a multi-node"},{"line_number":18,"context_line":"# migration it doesn\u0027t set the created_at column to be non-nullable to"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_18730382","line":15,"range":{"start_line":15,"start_character":12,"end_line":15,"end_character":24},"in_reply_to":"9ad45d7e_3fcb7274","updated":"2016-08-09 02:46:36.000000000","message":"Ah, I mean when the DB is upgraded to the latest, we create `create_at` column in 105, and set it to nullable so that it is okay with those password without the new column, and then set the default value for it, this is what 105 did.\n\nSo, after the default value is being set in the 105, we can make the column non-nullable with a default value, it\u0027s DB level support. If this was done in 105, there is no need for those cleanup afterward.","commit_id":"f618b3089ce9652763d730ab71d7e900b0001075"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"422a925aaab54ca9eaf95cbcc69bf747940a4a38","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import sqlalchemy as sql"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# Migration 105 clean-up."},{"line_number":16,"context_line":"# In a multi-node migration, this could leave the created_at attribute"},{"line_number":17,"context_line":"# unset. In addition, to avoid other errors during a multi-node"},{"line_number":18,"context_line":"# migration it doesn\u0027t set the created_at column to be non-nullable to"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_3fcb7274","line":15,"range":{"start_line":15,"start_character":12,"end_line":15,"end_character":24},"in_reply_to":"bacf61ea_2659d3fd","updated":"2016-08-08 12:50:52.000000000","message":"Because otherwise during a rolling upgrade if a transaction came in via an old node, it would fail since the old code would not know to set a value.","commit_id":"f618b3089ce9652763d730ab71d7e900b0001075"}],"keystone/common/sql/migrate_repo_contract/versions/001_fixup_password_date_columns.py":[{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"afae26b6b807355e1d8ddca90a97b52b69b1fcf5","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    password_table \u003d sql.Table(\u0027password\u0027, meta, autoload\u003dTrue)"},{"line_number":33,"context_line":"    values \u003d {\u0027created_at\u0027: datetime.datetime.utcnow()}"},{"line_number":34,"context_line":"    stmt \u003d password_table.update().where("},{"line_number":35,"context_line":"        password_table.c.created_at \u003d\u003d null()).values(values)"},{"line_number":36,"context_line":"    stmt.execute()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    password_table.c.created_at.alter(nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3ac371cc_5536d6e7","line":35,"range":{"start_line":34,"start_character":4,"end_line":35,"end_character":61},"updated":"2016-08-16 00:09:05.000000000","message":"Shouldn\u0027t this happen as part of data migration; not contract?","commit_id":"16e7a746304cec9cacfde7b13ef2b2061787663b"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"e1ce5b6f4cf30746648e2708a984189ca32d67d2","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    password_table \u003d sql.Table(\u0027password\u0027, meta, autoload\u003dTrue)"},{"line_number":33,"context_line":"    values \u003d {\u0027created_at\u0027: datetime.datetime.utcnow()}"},{"line_number":34,"context_line":"    stmt \u003d password_table.update().where("},{"line_number":35,"context_line":"        password_table.c.created_at \u003d\u003d null()).values(values)"},{"line_number":36,"context_line":"    stmt.execute()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    password_table.c.created_at.alter(nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3ac371cc_f33437fc","line":35,"range":{"start_line":34,"start_character":4,"end_line":35,"end_character":61},"in_reply_to":"3ac371cc_5536d6e7","updated":"2016-08-16 03:57:01.000000000","message":"++","commit_id":"16e7a746304cec9cacfde7b13ef2b2061787663b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"357672ff17836594e573780714cef022d5f0d882","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    password_table \u003d sql.Table(\u0027password\u0027, meta, autoload\u003dTrue)"},{"line_number":33,"context_line":"    values \u003d {\u0027created_at\u0027: datetime.datetime.utcnow()}"},{"line_number":34,"context_line":"    stmt \u003d password_table.update().where("},{"line_number":35,"context_line":"        password_table.c.created_at \u003d\u003d null()).values(values)"},{"line_number":36,"context_line":"    stmt.execute()"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    password_table.c.created_at.alter(nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3ac371cc_02641b47","line":35,"range":{"start_line":34,"start_character":4,"end_line":35,"end_character":61},"in_reply_to":"3ac371cc_f33437fc","updated":"2016-08-16 07:12:23.000000000","message":"So that\u0027s how I had it originally in my previous patch....but since this problem only occurs when we are running a mixture of releases (i.e. Mitaka and Newton), this check has to happen after we have moved all the nodes to Newton.  The data migration happens before we start running the first Newton node, so we can\u0027t do it there. A side benefit is that it feel safer doing this right before we set the column to non nullable.","commit_id":"16e7a746304cec9cacfde7b13ef2b2061787663b"}],"keystone/common/sql/migration_helpers.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"0255a86076d1d979549140770a340e4532c12748","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        # Register the repo with the version control API"},{"line_number":137,"context_line":"        # If it already knows about the repo, it will throw"},{"line_number":138,"context_line":"        # an exception that we can safely ignore"},{"line_number":139,"context_line":"        try:"},{"line_number":140,"context_line":"            migration.db_version_control(engine, abs_path)"},{"line_number":141,"context_line":"        except exceptions.DatabaseAlreadyControlledError:  # nosec"},{"line_number":142,"context_line":"            pass"},{"line_number":143,"context_line":"        init_version \u003d get_init_version(abs_path\u003dabs_path)"},{"line_number":144,"context_line":"        migration.db_sync(engine, abs_path,"},{"line_number":145,"context_line":"                          init_version\u003dinit_version, sanity_check\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_c7e09efd","line":142,"range":{"start_line":139,"start_character":0,"end_line":142,"end_character":16},"updated":"2016-08-12 08:36:12.000000000","message":"I just tried this and looks like it\u0027s not sqlalchemy migrate.exceptions.DatabaseAlreadyControlledError thrown here.\n\nThis is because the code that is called is from oslo.db instead of sqlalchemy migrate and it catches DBMigrationError instead.\n\nOr else, we will hit the follow exception when execute it repeatedly.\n\n\n2016-08-12 15:57:41.078 2163 TRACE keystone   File \"/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/migration.py\", line 157, in db_version_control\n2016-08-12 15:57:41.078 2163 TRACE keystone     raise exception.DBMigrationError(\"Database is already controlled.\")\n2016-08-12 15:57:41.078 2163 TRACE keystone DBMigrationError: Database is already controlled.","commit_id":"cc1c7c373935e603b5f16de5c983cb393a59eb40"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"7b9eff9a8f6d0a5b528fb8751799f9ff8a4a18e6","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        # Register the repo with the version control API"},{"line_number":137,"context_line":"        # If it already knows about the repo, it will throw"},{"line_number":138,"context_line":"        # an exception that we can safely ignore"},{"line_number":139,"context_line":"        try:"},{"line_number":140,"context_line":"            migration.db_version_control(engine, abs_path)"},{"line_number":141,"context_line":"        except exceptions.DatabaseAlreadyControlledError:  # nosec"},{"line_number":142,"context_line":"            pass"},{"line_number":143,"context_line":"        init_version \u003d get_init_version(abs_path\u003dabs_path)"},{"line_number":144,"context_line":"        migration.db_sync(engine, abs_path,"},{"line_number":145,"context_line":"                          init_version\u003dinit_version, sanity_check\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ad45d7e_2d94f942","line":142,"range":{"start_line":139,"start_character":0,"end_line":142,"end_character":16},"in_reply_to":"9ad45d7e_c7e09efd","updated":"2016-08-12 09:08:43.000000000","message":"Hmm, odd...for me, I still get the old error thrown (maybe depends on olso.db version?). For now, I added in both.","commit_id":"cc1c7c373935e603b5f16de5c983cb393a59eb40"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"afae26b6b807355e1d8ddca90a97b52b69b1fcf5","unresolved":false,"context_lines":[{"line_number":215,"context_line":"    keystone node is migrated to the latest release."},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    \"\"\""},{"line_number":218,"context_line":"    _sync_common_repo(version\u003dNone)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"def migrate_data():"}],"source_content_type":"text/x-python","patch_set":17,"id":"3ac371cc_5547f61c","line":218,"range":{"start_line":218,"start_character":3,"end_line":218,"end_character":35},"updated":"2016-08-16 00:09:05.000000000","message":"I assume this will change when you add expand, something like:\n_sync_additional_repo(repo_name\u003d\u0027migrate_repo_expand\u0027)","commit_id":"16e7a746304cec9cacfde7b13ef2b2061787663b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"357672ff17836594e573780714cef022d5f0d882","unresolved":false,"context_lines":[{"line_number":215,"context_line":"    keystone node is migrated to the latest release."},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    \"\"\""},{"line_number":218,"context_line":"    _sync_common_repo(version\u003dNone)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"def migrate_data():"}],"source_content_type":"text/x-python","patch_set":17,"id":"3ac371cc_62e98f80","line":218,"range":{"start_line":218,"start_character":3,"end_line":218,"end_character":35},"in_reply_to":"3ac371cc_5547f61c","updated":"2016-08-16 07:12:23.000000000","message":"We could...although the expand repo is the current repo, so wasn\u0027t intending to change the name....although happy to if people think that would be better.","commit_id":"16e7a746304cec9cacfde7b13ef2b2061787663b"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"ed2cf4c3a0e1f31eb4ee9f7a6018e6dce63a1ca3","unresolved":false,"context_lines":[{"line_number":215,"context_line":"    keystone node is migrated to the latest release."},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    \"\"\""},{"line_number":218,"context_line":"    _sync_common_repo(version\u003dNone)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"def migrate_data():"}],"source_content_type":"text/x-python","patch_set":17,"id":"3ac371cc_f401ab6b","line":218,"range":{"start_line":218,"start_character":3,"end_line":218,"end_character":35},"in_reply_to":"3ac371cc_62e98f80","updated":"2016-08-16 12:10:20.000000000","message":"Yeah, I think we will need an expand repo, so that when a developer makes a db change, they will add a new script in each phase with the same number.  So a 001 script in each repo (expand, migrate, contract).","commit_id":"16e7a746304cec9cacfde7b13ef2b2061787663b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"de3955179c6966d6543ebabeb37507b3b2593b63","unresolved":false,"context_lines":[{"line_number":215,"context_line":"    keystone node is migrated to the latest release."},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    \"\"\""},{"line_number":218,"context_line":"    _sync_common_repo(version\u003dNone)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"def migrate_data():"}],"source_content_type":"text/x-python","patch_set":17,"id":"3ac371cc_ef44381c","line":218,"range":{"start_line":218,"start_character":3,"end_line":218,"end_character":35},"in_reply_to":"3ac371cc_f401ab6b","updated":"2016-08-16 12:18:16.000000000","message":"Not sure about that...unless we want to re-write history of the current repo (which is now effectively the expand repo). We could start at the current version number (e.g. 100 or so) if we wanted, I suppose. And of course many expand changes don\u0027t have any migration or contract work to do","commit_id":"16e7a746304cec9cacfde7b13ef2b2061787663b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"436f474a36773f582e6320fe37bae088e9af1167","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    keystone node is migrated to the latest release."},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    \"\"\""},{"line_number":219,"context_line":"    _sync_repo(repo_name\u003d\u0027expand_repo\u0027)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"def migrate_data():"}],"source_content_type":"text/x-python","patch_set":21,"id":"3ac371cc_0dcec481","line":219,"range":{"start_line":219,"start_character":4,"end_line":219,"end_character":39},"updated":"2016-08-17 10:37:03.000000000","message":"need to call sync_common_repo here (and make sure we don\u0027t call it in db_sync case if we are going to call expand_schema)","commit_id":"d1c903528feb3377f2463a3f7ce66c053c3d0f26"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"08faaa4a2ab6e67c96c607bccf7c7689a9a59798","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        engine \u003d session.get_bind()"},{"line_number":123,"context_line":"        _assert_not_schema_downgrade(version\u003dversion)"},{"line_number":124,"context_line":"        migration.db_sync(engine, abs_path, version\u003dversion,"},{"line_number":125,"context_line":"                          init_version\u003dinit_version, sanity_check\u003dFalse)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"def get_init_version(abs_path\u003dNone):"}],"source_content_type":"text/x-python","patch_set":22,"id":"3ac371cc_658e442f","side":"PARENT","line":125,"updated":"2016-08-17 22:31:00.000000000","message":"Can this call _sync_repo() now?","commit_id":"0b4f6ebdcc866388e1c6788f45f270414b45aeef"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"08faaa4a2ab6e67c96c607bccf7c7689a9a59798","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        # an exception that we can safely ignore"},{"line_number":135,"context_line":"        try:"},{"line_number":136,"context_line":"            migration.db_version_control(engine, abs_path)"},{"line_number":137,"context_line":"        except (migration.exception.DbMigrationError,"},{"line_number":138,"context_line":"                exceptions.DatabaseAlreadyControlledError):  # nosec"},{"line_number":139,"context_line":"            pass"},{"line_number":140,"context_line":"        init_version \u003d get_init_version(abs_path\u003dabs_path)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3ac371cc_c50e18e4","line":137,"updated":"2016-08-17 22:31:00.000000000","message":"-1 This exception should be raised -- it doesn\u0027t have anything to do with the exception below that it\u0027s safe to ignore.","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"49e6e1dc589617b55113c0b48280843efa50c1bd","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        # an exception that we can safely ignore"},{"line_number":135,"context_line":"        try:"},{"line_number":136,"context_line":"            migration.db_version_control(engine, abs_path)"},{"line_number":137,"context_line":"        except (migration.exception.DbMigrationError,"},{"line_number":138,"context_line":"                exceptions.DatabaseAlreadyControlledError):  # nosec"},{"line_number":139,"context_line":"            pass"},{"line_number":140,"context_line":"        init_version \u003d get_init_version(abs_path\u003dabs_path)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3ac371cc_710ba2d6","line":137,"in_reply_to":"3ac371cc_c50e18e4","updated":"2016-08-18 00:26:14.000000000","message":"It appears that (some versions of) oslo_db catch DatabaseAlreadyControlledError and raises DbMigrationError...at least that was what people were claiming before I also caught DbMigrationError","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"97c53f74fb8589489517900807ee6621d49074c5","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    \"\"\""},{"line_number":193,"context_line":"    if version:"},{"line_number":194,"context_line":"        _sync_common_repo(version)"},{"line_number":195,"context_line":"    else:"},{"line_number":196,"context_line":"        expand_schema()"},{"line_number":197,"context_line":"        migrate_data()"},{"line_number":198,"context_line":"        contract_schema()"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_81a96d27","line":195,"updated":"2016-08-18 20:06:19.000000000","message":"! This should always run _sync_common_repo() in the else block before running expand, migrate, and contract to ensure we\u0027re on the last version of the legacy repository before switching over to the new migrations.","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"0130a92d00024519eea5b0ff45e094e9b2378897","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    \"\"\""},{"line_number":193,"context_line":"    if version:"},{"line_number":194,"context_line":"        _sync_common_repo(version)"},{"line_number":195,"context_line":"    else:"},{"line_number":196,"context_line":"        expand_schema()"},{"line_number":197,"context_line":"        migrate_data()"},{"line_number":198,"context_line":"        contract_schema()"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_55ae0be8","line":195,"in_reply_to":"3ac371cc_7ae33634","updated":"2016-08-18 21:17:08.000000000","message":"...to ensure that when someone starts with db_sync --expand then we also sync the legacy repo","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"c465e89e52065a5f35ac04e981ad2cf5477e0ba1","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    \"\"\""},{"line_number":193,"context_line":"    if version:"},{"line_number":194,"context_line":"        _sync_common_repo(version)"},{"line_number":195,"context_line":"    else:"},{"line_number":196,"context_line":"        expand_schema()"},{"line_number":197,"context_line":"        migrate_data()"},{"line_number":198,"context_line":"        contract_schema()"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_7ae33634","line":195,"in_reply_to":"3ac371cc_81a96d27","updated":"2016-08-18 20:55:21.000000000","message":"this is run on line 221","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"}],"keystone/tests/unit/test_sql_banned_operations.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ce38176123d6db7e3aa8dcb89b91b07dffb1f852","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"class TestKeystoneExpandSchemaMigrationsMySQL("},{"line_number":180,"context_line":"        KeystoneMigrationsCheckers, test_base.MySQLOpportunisticTestCase):"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @property"},{"line_number":183,"context_line":"    def INIT_VERSION(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_4c43486c","line":180,"updated":"2016-08-18 13:51:11.000000000","message":"What about doing this for the keystone_data_migrate and keystone_contract repos?","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"8f8a1c82a4f544ca64122f1706cabc6c34dd19cb","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"class TestKeystoneExpandSchemaMigrationsMySQL("},{"line_number":180,"context_line":"        KeystoneMigrationsCheckers, test_base.MySQLOpportunisticTestCase):"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @property"},{"line_number":183,"context_line":"    def INIT_VERSION(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"1ac06dbe_22487b2d","line":180,"in_reply_to":"3ac371cc_3aab7ed8","updated":"2016-08-19 12:41:41.000000000","message":"Agreed.  I\u0027ll add a follow up patch to provide this (different) restrictions","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"4ab2442280e4b47a2b0ad3cd42176d9171029c5a","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"class TestKeystoneExpandSchemaMigrationsMySQL("},{"line_number":180,"context_line":"        KeystoneMigrationsCheckers, test_base.MySQLOpportunisticTestCase):"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @property"},{"line_number":183,"context_line":"    def INIT_VERSION(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_7f9b2873","line":180,"in_reply_to":"3ac371cc_41949543","updated":"2016-08-18 20:41:25.000000000","message":"good point! this can be done as a follow up i believe","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22cf34aa99e6eca7bd8f8c3de7d79684b19c540f","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"class TestKeystoneExpandSchemaMigrationsMySQL("},{"line_number":180,"context_line":"        KeystoneMigrationsCheckers, test_base.MySQLOpportunisticTestCase):"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @property"},{"line_number":183,"context_line":"    def INIT_VERSION(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_92da6b15","line":180,"in_reply_to":"3ac371cc_4c43486c","updated":"2016-08-18 15:56:57.000000000","message":"these are the banned operations, not sure those should ever be banned","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d3a90b416e824c56cbc22e8137d6cff114296d5d","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"class TestKeystoneExpandSchemaMigrationsMySQL("},{"line_number":180,"context_line":"        KeystoneMigrationsCheckers, test_base.MySQLOpportunisticTestCase):"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @property"},{"line_number":183,"context_line":"    def INIT_VERSION(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_3aab7ed8","line":180,"in_reply_to":"3ac371cc_7f9b2873","updated":"2016-08-18 20:53:29.000000000","message":"I should add INSERT into that last point.","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b497f2fd1308af942674ca3392e304278f61ca48","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"class TestKeystoneExpandSchemaMigrationsMySQL("},{"line_number":180,"context_line":"        KeystoneMigrationsCheckers, test_base.MySQLOpportunisticTestCase):"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @property"},{"line_number":183,"context_line":"    def INIT_VERSION(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_41949543","line":180,"in_reply_to":"3ac371cc_92da6b15","updated":"2016-08-18 19:59:17.000000000","message":"Each of the three new repos has it\u0027s own set of banned and whitelisted operations. You shouldn\u0027t be able to drop tables, columns, indexes, or triggers in the expand or data migration repos. You shouldn\u0027t be able to create tables, columns, indexes, or triggers in the data migration or contraction repos. You shouldn\u0027t be able to UPDATE or DELETE data in the expand or contract repos.","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"}],"keystone/tests/unit/test_sql_upgrade.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"704093de7e85c75aa97411a25c3b091a34b539ae","unresolved":false,"context_lines":[{"line_number":1650,"context_line":"    FIXTURE \u003d test_base.MySQLOpportunisticFixture"},{"line_number":1651,"context_line":""},{"line_number":1652,"context_line":""},{"line_number":1653,"context_line":"class PostgreSQLOpportunisticContractSchemaUpgradeTestCase("},{"line_number":1654,"context_line":"        SqlContractSchemaUpgradeTests):"},{"line_number":1655,"context_line":"    FIXTURE \u003d test_base.PostgreSQLOpportunisticFixture"},{"line_number":1656,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3ac371cc_89cf5928","line":1653,"range":{"start_line":1653,"start_character":6,"end_line":1653,"end_character":58},"updated":"2016-08-17 03:43:05.000000000","message":"looks like this one is failing :\\","commit_id":"8bb264df1f0936e9deaf293040d6b1c817702640"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"2964932ceb9761128eeebd90e9aa8a212c07385e","unresolved":false,"context_lines":[{"line_number":1644,"context_line":""},{"line_number":1645,"context_line":""},{"line_number":1646,"context_line":"class MySQLOpportunisticContractSchemaUpgradeTestCase("},{"line_number":1647,"context_line":"        SqlContractSchemaUpgradeTests):"},{"line_number":1648,"context_line":"    FIXTURE \u003d test_base.MySQLOpportunisticFixture"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"class PostgreSQLOpportunisticContractSchemaUpgradeTestCase("},{"line_number":1652,"context_line":"        SqlContractSchemaUpgradeTests):"},{"line_number":1653,"context_line":"    FIXTURE \u003d test_base.PostgreSQLOpportunisticFixture"},{"line_number":1654,"context_line":""},{"line_number":1655,"context_line":""},{"line_number":1656,"context_line":"class VersionTests(SqlMigrateBase):"}],"source_content_type":"text/x-python","patch_set":22,"id":"3ac371cc_a6dfcd0b","line":1653,"range":{"start_line":1647,"start_character":0,"end_line":1653,"end_character":54},"updated":"2016-08-17 11:31:08.000000000","message":"There\u0027s still something screwy happening here - basically the database is not getting reset between each TestCase...meaning that a previous test pollutes the next","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ce38176123d6db7e3aa8dcb89b91b07dffb1f852","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    def repo_package(self):"},{"line_number":197,"context_line":"        return sql"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def initialize_repo(self, repo_name\u003dLEGACY_REPO):"},{"line_number":200,"context_line":"        self.repo_path \u003d migration_helpers.find_migrate_repo("},{"line_number":201,"context_line":"            package\u003dself.repo_package(),"},{"line_number":202,"context_line":"            repo_name\u003drepo_name)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_726b7ab7","line":199,"updated":"2016-08-18 13:51:11.000000000","message":"Should we change this to None and set the default in the method if repo_name is None? \n\n  def initialize_repo(self, repo_name\u003dNone):\n      if not repo_name:\n          repo_name \u003d LEGACY_REPO","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22cf34aa99e6eca7bd8f8c3de7d79684b19c540f","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    def repo_package(self):"},{"line_number":197,"context_line":"        return sql"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def initialize_repo(self, repo_name\u003dLEGACY_REPO):"},{"line_number":200,"context_line":"        self.repo_path \u003d migration_helpers.find_migrate_repo("},{"line_number":201,"context_line":"            package\u003dself.repo_package(),"},{"line_number":202,"context_line":"            repo_name\u003drepo_name)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_921f0bb6","line":199,"in_reply_to":"3ac371cc_726b7ab7","updated":"2016-08-18 15:56:57.000000000","message":"style change, meh","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b497f2fd1308af942674ca3392e304278f61ca48","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    def repo_package(self):"},{"line_number":197,"context_line":"        return sql"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def initialize_repo(self, repo_name\u003dLEGACY_REPO):"},{"line_number":200,"context_line":"        self.repo_path \u003d migration_helpers.find_migrate_repo("},{"line_number":201,"context_line":"            package\u003dself.repo_package(),"},{"line_number":202,"context_line":"            repo_name\u003drepo_name)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3ac371cc_a1e0e9cd","line":199,"in_reply_to":"3ac371cc_921f0bb6","updated":"2016-08-18 19:59:17.000000000","message":"Erm, you\u0027re both wrong? (It\u0027s not a style issue, and the current code is correct.) The pattern Lance is suggesting is only useful for mutable, non-primitive objects (which LEGACY_REPO is not) to avoid storing state on method initialization.","commit_id":"96ec431aa0d6b9a7ee50ac3fff5c00f2a58fad22"}],"releasenotes/notes/bp-manage-migration-c398963a943a89fe.yaml":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"08faaa4a2ab6e67c96c607bccf7c7689a9a59798","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - \u003e"},{"line_number":4,"context_line":"    [`blueprint manage-migration \u003chttps://blueprints.launchpad.net/keystone/+spec/manage-migration\u003e`_]"},{"line_number":5,"context_line":"    Upgrading keystone to a new version can now be undertaking as a rolling"},{"line_number":6,"context_line":"    upgrade using the `--expand`, `--migrate` and `--contract` options of the"},{"line_number":7,"context_line":"    `keystone-manage db_sync` command."}],"source_content_type":"text/x-yaml","patch_set":22,"id":"3ac371cc_45e7c83f","line":5,"updated":"2016-08-17 22:31:00.000000000","message":"undertaken?","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"a8faa0c4aba8e15bf1a927a12aebe02954574011","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - \u003e"},{"line_number":4,"context_line":"    [`blueprint manage-migration \u003chttps://blueprints.launchpad.net/keystone/+spec/manage-migration\u003e`_]"},{"line_number":5,"context_line":"    Upgrading keystone to a new version can now be undertaking as a rolling"},{"line_number":6,"context_line":"    upgrade using the `--expand`, `--migrate` and `--contract` options of the"},{"line_number":7,"context_line":"    `keystone-manage db_sync` command."}],"source_content_type":"text/x-yaml","patch_set":22,"id":"3ac371cc_49186cd3","line":5,"in_reply_to":"3ac371cc_45e7c83f","updated":"2016-08-18 09:39:32.000000000","message":"Done","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"08faaa4a2ab6e67c96c607bccf7c7689a9a59798","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    [`blueprint manage-migration \u003chttps://blueprints.launchpad.net/keystone/+spec/manage-migration\u003e`_]"},{"line_number":5,"context_line":"    Upgrading keystone to a new version can now be undertaking as a rolling"},{"line_number":6,"context_line":"    upgrade using the `--expand`, `--migrate` and `--contract` options of the"},{"line_number":7,"context_line":"    `keystone-manage db_sync` command."}],"source_content_type":"text/x-yaml","patch_set":22,"id":"3ac371cc_65d64450","line":7,"updated":"2016-08-17 22:31:00.000000000","message":"Woot!","commit_id":"4272fdf97a2f9c96e9bd609db9cc65be41d47bed"}]}
