)]}'
{"glance/db/sqlalchemy/migrate_repo/versions/002_add_image_properties_table.py":[{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"089d91bf75cdd6d58927c1cb3f8f16b94a39ed17","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    images \u003d define_images_table(meta)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    # DB2: specify the UniqueConstraint option when creating the table"},{"line_number":33,"context_line":"    # will cause an index being created so specify the index"},{"line_number":34,"context_line":"    # name and skip the step of creating another index with the same columns."},{"line_number":35,"context_line":"    # The index name is needed so it can be dropped and re-created later on."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FpS4%3D","line":32,"updated":"2013-09-01 19:14:57.000000000","message":"add NOTE(dperaza)","commit_id":"fae5e53cb65596c9cc30e194e8db2f3cd1e99150"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"4fed700d87ec1893001653b42fa212f773fc12d9","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    images \u003d define_images_table(meta)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    # DB2: specify the UniqueConstraint option when creating the table"},{"line_number":33,"context_line":"    # will cause an index being created so specify the index"},{"line_number":34,"context_line":"    # name and skip the step of creating another index with the same columns."},{"line_number":35,"context_line":"    # The index name is needed so it can be dropped and re-created later on."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FI0I%3D","line":32,"in_reply_to":"AAAASn%2F%2FpS4%3D","updated":"2013-10-03 17:08:36.000000000","message":"yeap","commit_id":"fae5e53cb65596c9cc30e194e8db2f3cd1e99150"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"089d91bf75cdd6d58927c1cb3f8f16b94a39ed17","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    images \u003d define_images_table(meta)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    # DB2: specify the UniqueConstraint option when creating the table"},{"line_number":33,"context_line":"    # will cause an index being created so specify the index"},{"line_number":34,"context_line":"    # name and skip the step of creating another index with the same columns."},{"line_number":35,"context_line":"    # The index name is needed so it can be dropped and re-created later on."},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FpSo%3D","line":33,"updated":"2013-09-01 19:14:57.000000000","message":"will cause an index to be create.  So","commit_id":"fae5e53cb65596c9cc30e194e8db2f3cd1e99150"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"4fed700d87ec1893001653b42fa212f773fc12d9","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    images \u003d define_images_table(meta)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    # DB2: specify the UniqueConstraint option when creating the table"},{"line_number":33,"context_line":"    # will cause an index being created so specify the index"},{"line_number":34,"context_line":"    # name and skip the step of creating another index with the same columns."},{"line_number":35,"context_line":"    # The index name is needed so it can be dropped and re-created later on."},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FIz8%3D","line":33,"in_reply_to":"AAAASn%2F%2FpSo%3D","updated":"2013-10-03 17:08:36.000000000","message":"yeap","commit_id":"fae5e53cb65596c9cc30e194e8db2f3cd1e99150"}],"glance/db/sqlalchemy/migrate_repo/versions/006_key_to_name.py":[{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"089d91bf75cdd6d58927c1cb3f8f16b94a39ed17","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    image_properties \u003d get_image_properties_table(meta)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    if migrate_engine.name \u003d\u003d \"ibm_db_sa\":"},{"line_number":83,"context_line":"        # ibm db2 does not allow ALTER INDEX so we will drop"},{"line_number":84,"context_line":"        # the index, rename the column, then re-create the index"},{"line_number":85,"context_line":"        sql_commands \u003d ["},{"line_number":86,"context_line":"            \"\"\"ALTER TABLE image_properties DROP UNIQUE"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FpSg%3D","line":83,"updated":"2013-09-01 19:14:57.000000000","message":"NOTE(dperaza), add this elsewhere too.","commit_id":"fae5e53cb65596c9cc30e194e8db2f3cd1e99150"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"4fed700d87ec1893001653b42fa212f773fc12d9","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    image_properties \u003d get_image_properties_table(meta)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    if migrate_engine.name \u003d\u003d \"ibm_db_sa\":"},{"line_number":83,"context_line":"        # ibm db2 does not allow ALTER INDEX so we will drop"},{"line_number":84,"context_line":"        # the index, rename the column, then re-create the index"},{"line_number":85,"context_line":"        sql_commands \u003d ["},{"line_number":86,"context_line":"            \"\"\"ALTER TABLE image_properties DROP UNIQUE"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FI0s%3D","line":83,"in_reply_to":"AAAASn%2F%2FpSg%3D","updated":"2013-10-03 17:08:36.000000000","message":"will do","commit_id":"fae5e53cb65596c9cc30e194e8db2f3cd1e99150"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"089d91bf75cdd6d58927c1cb3f8f16b94a39ed17","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            \"\"\"ALTER TABLE image_properties RENAME COLUMN \\\"key\\\" to name;\"\"\","},{"line_number":89,"context_line":"            \"\"\"ALTER TABLE image_properties ADD CONSTRAINT"},{"line_number":90,"context_line":"                ix_image_properties_image_id_name UNIQUE(image_id, name);\"\"\","},{"line_number":91,"context_line":"        ]"},{"line_number":92,"context_line":"        for command in sql_commands:"},{"line_number":93,"context_line":"            meta.bind.execute(command)"},{"line_number":94,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FpSk%3D","line":91,"updated":"2013-09-01 19:14:57.000000000","message":"I would prefer to do this without manually creating the sql commands in strings.  Is this not possible by making sqlalchemy calls?","commit_id":"fae5e53cb65596c9cc30e194e8db2f3cd1e99150"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"4fed700d87ec1893001653b42fa212f773fc12d9","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            \"\"\"ALTER TABLE image_properties RENAME COLUMN \\\"key\\\" to name;\"\"\","},{"line_number":89,"context_line":"            \"\"\"ALTER TABLE image_properties ADD CONSTRAINT"},{"line_number":90,"context_line":"                ix_image_properties_image_id_name UNIQUE(image_id, name);\"\"\","},{"line_number":91,"context_line":"        ]"},{"line_number":92,"context_line":"        for command in sql_commands:"},{"line_number":93,"context_line":"            meta.bind.execute(command)"},{"line_number":94,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FI0Y%3D","line":91,"in_reply_to":"AAAASn%2F%2FpSk%3D","updated":"2013-10-03 17:08:36.000000000","message":"I think I tried to with no success but it has been a while, need to revisit","commit_id":"fae5e53cb65596c9cc30e194e8db2f3cd1e99150"}],"glance/db/sqlalchemy/migrate_repo/versions/012_id_to_uuid.py":[{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"ed97e07b4b7888780f43d7b96d26bc9886d366e2","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from glance.openstack.common import uuidutils"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from migrate.changeset import *"},{"line_number":31,"context_line":"from sqlalchemy import *"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"meta \u003d sqlalchemy.MetaData()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAP3%2F%2F9mk%3D","line":31,"updated":"2013-07-08 14:20:23.000000000","message":"I think, it\u0027s bad idea to use ` from XXX import *`","commit_id":"1ad81a7bc17452656fda6594203b64538b26376b"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"70464530424960cab4bbf84a599643c2e73896a1","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from glance.openstack.common import uuidutils"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from migrate.changeset import *"},{"line_number":31,"context_line":"from sqlalchemy import *"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"meta \u003d sqlalchemy.MetaData()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAP3%2F%2FyW8%3D","line":31,"in_reply_to":"AAAAP3%2F%2F9mk%3D","updated":"2013-07-11 14:00:55.000000000","message":"Done","commit_id":"1ad81a7bc17452656fda6594203b64538b26376b"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"2163f19c19a067d201bb23c9089d6f63660f5b31","unresolved":false,"context_lines":[{"line_number":456,"context_line":"    for fk in foreign_keys:"},{"line_number":457,"context_line":"        fk.drop()"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    _update_all_uuids_to_ids(t_images, t_image_members, t_image_properties)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    t_images.c.id.alter(sqlalchemy.Integer(), primary_key\u003dTrue)"},{"line_number":462,"context_line":"    t_image_members.c.image_id.alter(sqlalchemy.Integer())"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwHM%3D","line":459,"updated":"2013-10-29 15:09:39.000000000","message":"May I know why we need this change?","commit_id":"5fdaf0163c90b10d9f54884ccb6a5d27151f1214"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"af187df5c0a04656a0b7096bec530c5af3acf926","unresolved":false,"context_lines":[{"line_number":456,"context_line":"    for fk in foreign_keys:"},{"line_number":457,"context_line":"        fk.drop()"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    _update_all_uuids_to_ids(t_images, t_image_members, t_image_properties)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    t_images.c.id.alter(sqlalchemy.Integer(), primary_key\u003dTrue)"},{"line_number":462,"context_line":"    t_image_members.c.image_id.alter(sqlalchemy.Integer())"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2Fmus%3D","line":459,"in_reply_to":"AAAATn%2F%2FwHM%3D","updated":"2013-10-31 15:00:06.000000000","message":"Good question. Going back on revert we need to convert from uuid strings to id integers. If we call 3 lines bellow first it will try to convert uuid string to int and it will fail. However if we call the update to ids first it will try to convert ID strings into ID integers which works fine. Hope it makes sense","commit_id":"5fdaf0163c90b10d9f54884ccb6a5d27151f1214"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"2163f19c19a067d201bb23c9089d6f63660f5b31","unresolved":false,"context_lines":[{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        t_images.update().\\"},{"line_number":555,"context_line":"            where(t_images.c.id \u003d\u003d old_id).\\"},{"line_number":556,"context_line":"            values(id\u003dstr(new_id)).execute()"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"        t_image_members.update().\\"},{"line_number":559,"context_line":"            where(t_image_members.c.image_id \u003d\u003d old_id).\\"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwGg%3D","line":556,"updated":"2013-10-29 15:09:39.000000000","message":"It would be nice if you can clarify why we need this given so that the other reviewers can evaluate the change.","commit_id":"5fdaf0163c90b10d9f54884ccb6a5d27151f1214"},{"author":{"_account_id":5313,"name":"David Peraza","email":"david_peraza@persistentsys.com","username":"dperaza"},"change_message_id":"af187df5c0a04656a0b7096bec530c5af3acf926","unresolved":false,"context_lines":[{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        t_images.update().\\"},{"line_number":555,"context_line":"            where(t_images.c.id \u003d\u003d old_id).\\"},{"line_number":556,"context_line":"            values(id\u003dstr(new_id)).execute()"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"        t_image_members.update().\\"},{"line_number":559,"context_line":"            where(t_image_members.c.image_id \u003d\u003d old_id).\\"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FmuM%3D","line":556,"in_reply_to":"AAAATn%2F%2FwGg%3D","updated":"2013-10-31 15:00:06.000000000","message":"I need to convert uuid string to id string first. Then the alter statements will change id string to id int. This is related to change above","commit_id":"5fdaf0163c90b10d9f54884ccb6a5d27151f1214"}]}
