)]}'
{"doc/source/developing.rst":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"60e5afe7dbb3da7d08f1880c84db5af10e15fd32","unresolved":false,"context_lines":[{"line_number":159,"context_line":"  the constraint. (For example, a unique constraint must clean up duplicate"},{"line_number":160,"context_line":"  records before applying said constraint.)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"* Data migrations - should be done in an online fashion by custom code in the"},{"line_number":163,"context_line":"  SQLAlchemy layer that handles moving data between the old and new portions"},{"line_number":164,"context_line":"  of the schema. In addition, for each type of data migration performed, there"},{"line_number":165,"context_line":"  a keystone-manage option can be added for an operator to manually request"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da6ed579_10b9a579","line":162,"range":{"start_line":162,"start_character":20,"end_line":162,"end_character":26},"updated":"2016-01-18 14:50:30.000000000","message":"Should* (just to be consistent with the rest of the bullet points)","commit_id":"e5960f14c49be092df68b8dfa255f39307c25945"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"b3d0355f49d2ab94a4a63f534b5b466f806da25b","unresolved":false,"context_lines":[{"line_number":159,"context_line":"  the constraint. (For example, a unique constraint must clean up duplicate"},{"line_number":160,"context_line":"  records before applying said constraint.)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"* Data migrations - should be done in an online fashion by custom code in the"},{"line_number":163,"context_line":"  SQLAlchemy layer that handles moving data between the old and new portions"},{"line_number":164,"context_line":"  of the schema. In addition, for each type of data migration performed, there"},{"line_number":165,"context_line":"  a keystone-manage option can be added for an operator to manually request"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba63e191_de9021ef","line":162,"range":{"start_line":162,"start_character":20,"end_line":162,"end_character":26},"in_reply_to":"da6ed579_10b9a579","updated":"2016-01-19 09:33:16.000000000","message":"Done","commit_id":"e5960f14c49be092df68b8dfa255f39307c25945"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"60e5afe7dbb3da7d08f1880c84db5af10e15fd32","unresolved":false,"context_lines":[{"line_number":171,"context_line":"  the online migrations."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"* Before running `contract` in the expand/migrate/contract schema migration"},{"line_number":174,"context_line":"  workflow, the remaining data migrations should be performed by the contract"},{"line_number":175,"context_line":"  script. Alternatively, running a relevant keystone-manage migration should"},{"line_number":176,"context_line":"  be enforced, to ensure that all remaining data migrations are completed."},{"line_number":177,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"da6ed579_702fc1a1","line":174,"range":{"start_line":174,"start_character":69,"end_line":174,"end_character":77},"updated":"2016-01-18 14:50:30.000000000","message":"The contract piece should just remove whatever isn\u0027t needed anymore. Nova makes it so that the contraction migration doesn\u0027t actually run unless all the data is out of the old columns, right?","commit_id":"e5960f14c49be092df68b8dfa255f39307c25945"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"b3d0355f49d2ab94a4a63f534b5b466f806da25b","unresolved":false,"context_lines":[{"line_number":171,"context_line":"  the online migrations."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"* Before running `contract` in the expand/migrate/contract schema migration"},{"line_number":174,"context_line":"  workflow, the remaining data migrations should be performed by the contract"},{"line_number":175,"context_line":"  script. Alternatively, running a relevant keystone-manage migration should"},{"line_number":176,"context_line":"  be enforced, to ensure that all remaining data migrations are completed."},{"line_number":177,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba63e191_1e8799b6","line":174,"range":{"start_line":174,"start_character":69,"end_line":174,"end_character":77},"in_reply_to":"da6ed579_702fc1a1","updated":"2016-01-19 09:33:16.000000000","message":"Yes, I think they, as a rule, fill the old columns with null values before they delete them. I\u0027ll add this here, it may be a good advice.","commit_id":"e5960f14c49be092df68b8dfa255f39307c25945"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"40aed4330f561a4482efc4d3892a4043dac7b22b","unresolved":false,"context_lines":[{"line_number":142,"context_line":"  #. Expand phase: The element must be deprecated and retained for backward"},{"line_number":143,"context_line":"     compatibility. This allows for graceful upgrade from X release to X+1."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"  #. Migrate phase: Data migration, must completely migrate data from the old"},{"line_number":146,"context_line":"     version of the schema to the new version (see examples below)."},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"  #. Contract phase: The column can then be removed with a migration at the"},{"line_number":149,"context_line":"     start of X+2."}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_31e9791b","line":146,"range":{"start_line":145,"start_character":5,"end_line":146,"end_character":67},"updated":"2016-01-20 19:42:04.000000000","message":"Do we have a standard on how we want to do this piece? The migrate phase can either be done *in* the API as calls are made, done via a migration script like keystone-manage db_migrate \u003cmigration\u003e, or both. \n\nAre we going to provide guidance on this or is it going to be treated on a case-by-case basis?","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"44f63fdb463a7295e630bbc172019720ae11e0a6","unresolved":false,"context_lines":[{"line_number":142,"context_line":"  #. Expand phase: The element must be deprecated and retained for backward"},{"line_number":143,"context_line":"     compatibility. This allows for graceful upgrade from X release to X+1."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"  #. Migrate phase: Data migration, must completely migrate data from the old"},{"line_number":146,"context_line":"     version of the schema to the new version (see examples below)."},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"  #. Contract phase: The column can then be removed with a migration at the"},{"line_number":149,"context_line":"     start of X+2."}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_972f9ef5","line":146,"range":{"start_line":145,"start_character":5,"end_line":146,"end_character":67},"in_reply_to":"9a68dd71_31e9791b","updated":"2016-01-22 11:09:00.000000000","message":"I think both are the ideal, at a minimum, the migration should happen in the contract script, before contracting the schema. keystone-manage command is nice to have, so that the operator can migrate chunks of data while normally operating the service.\n\nThe API has to at least be aware that data should be retrieved or read from more than one place, to maintain consistency.","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"40aed4330f561a4482efc4d3892a4043dac7b22b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"  #. Migrate phase: Data migration, must completely migrate data from the old"},{"line_number":146,"context_line":"     version of the schema to the new version (see examples below)."},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"  #. Contract phase: The column can then be removed with a migration at the"},{"line_number":149,"context_line":"     start of X+2."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"* Release notes - There should be a release note in case an operation is"},{"line_number":152,"context_line":"  blocking, \"expensive\", or both. You can find information on which DDL"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_115d55e9","line":149,"range":{"start_line":148,"start_character":5,"end_line":149,"end_character":18},"updated":"2016-01-20 19:42:04.000000000","message":"Are we going to allow the contract phase to happen if the migrate phases isn\u0027t complete?\n\nDo all of these steps in the Subtractive Schema Migrations section need to be done/enforced in order?","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"02977de245177b75ff1db1b5485e40ff2f7fdaf2","unresolved":false,"context_lines":[{"line_number":149,"context_line":"     start of X+2."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"* Release notes - There should be a release note in case an operation is"},{"line_number":152,"context_line":"  blocking, \"expensive\", or both. You can find information on which DDL"},{"line_number":153,"context_line":"  operations are expensive in `MySQL docs`_. Other supported SQL DBs support"},{"line_number":154,"context_line":"  `transactional DDL`_, and experienced DBA\u0027s know to take advantage of this"},{"line_number":155,"context_line":"  feature."}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_214b825b","line":152,"range":{"start_line":152,"start_character":2,"end_line":152,"end_character":10},"updated":"2016-01-21 08:43:39.000000000","message":"\"blocking\", \"expensive\"","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"bd894036e76a0779ec19354fbf4393f9cb1a14ff","unresolved":false,"context_lines":[{"line_number":157,"context_line":"* Constraints - When adding a foreign or unique key constraint, the schema"},{"line_number":158,"context_line":"  migration code needs to handle possible problems with data before applying"},{"line_number":159,"context_line":"  the constraint. (For example, a unique constraint must clean up duplicate"},{"line_number":160,"context_line":"  records before applying said constraint.)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"* Data migrations - should be done in an online fashion by custom code in the"},{"line_number":163,"context_line":"  SQLAlchemy layer that handles moving data between the old and new portions"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_3bd07853","line":160,"updated":"2016-01-20 19:03:54.000000000","message":"This sentence does not need to be in parens.","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"02977de245177b75ff1db1b5485e40ff2f7fdaf2","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"* Data migrations - should be done in an online fashion by custom code in the"},{"line_number":163,"context_line":"  SQLAlchemy layer that handles moving data between the old and new portions"},{"line_number":164,"context_line":"  of the schema. In addition, for each type of data migration performed, there"},{"line_number":165,"context_line":"  a keystone-manage option can be added for an operator to manually request"},{"line_number":166,"context_line":"  that rows be migrated (see examples below, like the nova flavor migration)."},{"line_number":167,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_2a96c94c","line":164,"range":{"start_line":164,"start_character":73,"end_line":164,"end_character":78},"updated":"2016-01-21 08:43:39.000000000","message":"there *is*","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"44f63fdb463a7295e630bbc172019720ae11e0a6","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"* Data migrations - should be done in an online fashion by custom code in the"},{"line_number":163,"context_line":"  SQLAlchemy layer that handles moving data between the old and new portions"},{"line_number":164,"context_line":"  of the schema. In addition, for each type of data migration performed, there"},{"line_number":165,"context_line":"  a keystone-manage option can be added for an operator to manually request"},{"line_number":166,"context_line":"  that rows be migrated (see examples below, like the nova flavor migration)."},{"line_number":167,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_9507911b","line":164,"range":{"start_line":164,"start_character":73,"end_line":164,"end_character":78},"in_reply_to":"9a68dd71_2a96c94c","updated":"2016-01-22 11:09:00.000000000","message":"Done","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"bd894036e76a0779ec19354fbf4393f9cb1a14ff","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"* All schema migrations should be idempotent. (For example, a migration"},{"line_number":169,"context_line":"  should check if an element exists in the schema before attempting to add"},{"line_number":170,"context_line":"  it.) This logic comes for free in the autogenerated workflow of"},{"line_number":171,"context_line":"  the online migrations."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"* Before running `contract` in the expand/migrate/contract schema migration"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_9be4043c","line":170,"updated":"2016-01-20 19:03:54.000000000","message":"This sentence does not need to be in parens.","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"44f63fdb463a7295e630bbc172019720ae11e0a6","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"* All schema migrations should be idempotent. (For example, a migration"},{"line_number":169,"context_line":"  should check if an element exists in the schema before attempting to add"},{"line_number":170,"context_line":"  it.) This logic comes for free in the autogenerated workflow of"},{"line_number":171,"context_line":"  the online migrations."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"* Before running `contract` in the expand/migrate/contract schema migration"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_50004701","line":170,"in_reply_to":"9a68dd71_9be4043c","updated":"2016-01-22 11:09:00.000000000","message":"Done","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"40aed4330f561a4482efc4d3892a4043dac7b22b","unresolved":false,"context_lines":[{"line_number":170,"context_line":"  it.) This logic comes for free in the autogenerated workflow of"},{"line_number":171,"context_line":"  the online migrations."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"* Before running `contract` in the expand/migrate/contract schema migration"},{"line_number":174,"context_line":"  workflow, the remaining data migrations should be performed by the contract"},{"line_number":175,"context_line":"  script. Alternatively, running a relevant keystone-manage migration should"},{"line_number":176,"context_line":"  be enforced, to ensure that all remaining data migrations are completed."},{"line_number":177,"context_line":"  It is a good practice to move data out of the old columns, and ensure they"},{"line_number":178,"context_line":"  are filled with null values before removing them."}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_3105f9c1","line":175,"range":{"start_line":173,"start_character":2,"end_line":175,"end_character":9},"updated":"2016-01-20 19:42:04.000000000","message":"This essentially answers my question above - maybe we can include it up there?","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"44f63fdb463a7295e630bbc172019720ae11e0a6","unresolved":false,"context_lines":[{"line_number":170,"context_line":"  it.) This logic comes for free in the autogenerated workflow of"},{"line_number":171,"context_line":"  the online migrations."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"* Before running `contract` in the expand/migrate/contract schema migration"},{"line_number":174,"context_line":"  workflow, the remaining data migrations should be performed by the contract"},{"line_number":175,"context_line":"  script. Alternatively, running a relevant keystone-manage migration should"},{"line_number":176,"context_line":"  be enforced, to ensure that all remaining data migrations are completed."},{"line_number":177,"context_line":"  It is a good practice to move data out of the old columns, and ensure they"},{"line_number":178,"context_line":"  are filled with null values before removing them."}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_61cff07f","line":175,"range":{"start_line":173,"start_character":2,"end_line":175,"end_character":9},"in_reply_to":"9a68dd71_3105f9c1","updated":"2016-01-22 11:09:00.000000000","message":"ok :)","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"0e5a8676f612e8a20e271e1eb0d97ba51d7c2127","unresolved":false,"context_lines":[{"line_number":150,"context_line":"     one place and format, to maintain consistency (see examples below)."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"  #. Contract phase: The column can then be removed with a schema migration at"},{"line_number":153,"context_line":"     the start of X+2. Contract phase can\u0027t happen if the data migration isn\u0027t"},{"line_number":154,"context_line":"     finished (see last point in this section)."},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"* Release notes - There should be a release note in case an operation is"},{"line_number":157,"context_line":"  \"blocking\", \"expensive\", or both. You can find information on which DDL"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9a68dd71_0f7f0016","line":154,"range":{"start_line":153,"start_character":23,"end_line":154,"end_character":46},"updated":"2016-01-22 15:18:19.000000000","message":"nice, thanks!","commit_id":"175b30b75610c9807d9f7b130524be65277782b3"}],"doc/source/devref/online_schema_migration_examples.rst":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"40aed4330f561a4482efc4d3892a4043dac7b22b","unresolved":false,"context_lines":[{"line_number":5,"context_line":""},{"line_number":6,"context_line":"This document links to several examples implementing online SQL schema"},{"line_number":7,"context_line":"migrations to facilitate simultaneously running OpenStack services in different versions with"},{"line_number":8,"context_line":"the same schema."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"* Nova `data migration example"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_b120094b","line":8,"range":{"start_line":8,"start_character":4,"end_line":8,"end_character":8},"updated":"2016-01-20 19:42:04.000000000","message":"With the same schema? Or a different schema? Wouldn\u0027t it be different if we were taking certain nodes out of the rotation to update their schema?","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"44f63fdb463a7295e630bbc172019720ae11e0a6","unresolved":false,"context_lines":[{"line_number":5,"context_line":""},{"line_number":6,"context_line":"This document links to several examples implementing online SQL schema"},{"line_number":7,"context_line":"migrations to facilitate simultaneously running OpenStack services in different versions with"},{"line_number":8,"context_line":"the same schema."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"* Nova `data migration example"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a68dd71_f55a8d4f","line":8,"range":{"start_line":8,"start_character":4,"end_line":8,"end_character":8},"in_reply_to":"9a68dd71_b120094b","updated":"2016-01-22 11:09:00.000000000","message":"The schema is modified on the database, so after taking the first node out of the rotation, we upgrade it, update the schema and start it. At this point we are running different versions with the same, updated schema.","commit_id":"31b41791e15ca6a1f9bc6184b48482ef97a0c39f"}]}
