)]}'
{"neutron/db/metering/metering_db.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"cf06f7055ba83a2081ea2026a5538d866b8cb357","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class MeteringLabel(model_base.BASEV2, models_v2.HasId, models_v2.HasTenant):"},{"line_number":48,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":49,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":50,"context_line":"    rules \u003d orm.relationship(MeteringLabelRule, backref\u003d\"label\","},{"line_number":51,"context_line":"                             cascade\u003d\"delete\", lazy\u003d\"joined\")"},{"line_number":52,"context_line":"    routers \u003d orm.relationship("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B6B8%3D","line":49,"updated":"2014-03-21 20:25:40.000000000","message":"Instead of changing this here we should have a migration that migrates the db field to 1024. The problem with this is some people will have this field as 1024 in their db if they didn\u0027t use neturon-db-manage to create  their database and instead allowed neutron-server to push the schema down for them.\n\nWhy didn\u0027t you do this for this change but you did for protocol on firewall?","commit_id":"0f468d6f6aa885d0621bf8d3c5edb99a28e028a7"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"db7d64b39b85c4f1c285a8c43b51b76e0f6ecf41","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class MeteringLabel(model_base.BASEV2, models_v2.HasId, models_v2.HasTenant):"},{"line_number":48,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":49,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":50,"context_line":"    rules \u003d orm.relationship(MeteringLabelRule, backref\u003d\"label\","},{"line_number":51,"context_line":"                             cascade\u003d\"delete\", lazy\u003d\"joined\")"},{"line_number":52,"context_line":"    routers \u003d orm.relationship("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BqqU%3D","line":49,"in_reply_to":"AAAAWH%2F%2B3kc%3D","updated":"2014-03-25 07:15:16.000000000","message":"Ok, will correct this.","commit_id":"0f468d6f6aa885d0621bf8d3c5edb99a28e028a7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"373158420be8c902acf66ab4ca4ef5119346e050","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class MeteringLabel(model_base.BASEV2, models_v2.HasId, models_v2.HasTenant):"},{"line_number":48,"context_line":"    name \u003d sa.Column(sa.String(255))"},{"line_number":49,"context_line":"    description \u003d sa.Column(sa.String(255))"},{"line_number":50,"context_line":"    rules \u003d orm.relationship(MeteringLabelRule, backref\u003d\"label\","},{"line_number":51,"context_line":"                             cascade\u003d\"delete\", lazy\u003d\"joined\")"},{"line_number":52,"context_line":"    routers \u003d orm.relationship("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B3kc%3D","line":49,"in_reply_to":"AAAAWH%2F%2B6B8%3D","updated":"2014-03-22 09:32:20.000000000","message":"Agree with Aaron.\n\nI think the only way to match models and migrations is to first add a migration to make migrations match models, because there is a possibility that tables are already created based on the current models.","commit_id":"0f468d6f6aa885d0621bf8d3c5edb99a28e028a7"}],"neutron/db/migration/alembic_migrations/versions/33c3db036fe4_set_length_of_description_field_metering.py":[{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"8df6920c4f989b5503d369b44f35aa6a2f4db44c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":50,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":51,"context_line":"        return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    op.alter_column(\u0027meteringlabels\u0027, \u0027description\u0027, type_\u003dsa.String(255),"},{"line_number":54,"context_line":"                    existing_nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F9o0U%3D","line":52,"updated":"2014-04-03 06:56:14.000000000","message":"if a length of any value from table is more than 255 we will have an error: value too long for type character varying(255)\n\nYou have to cut all values from table and after change the column\u0027s length","commit_id":"90362cd16941051bc19a3119d1d1e5da4041f28b"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"cc58299341d42451d872b8d557a178d4f1c2590b","unresolved":false,"context_lines":[{"line_number":49,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":50,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":51,"context_line":"        return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    op.alter_column(\u0027meteringlabels\u0027, \u0027description\u0027, type_\u003dsa.String(255),"},{"line_number":54,"context_line":"                    existing_nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F9op4%3D","line":52,"in_reply_to":"AAAAWH%2F9o0U%3D","updated":"2014-04-03 08:25:58.000000000","message":"I created migration instead of changing models because of comments to my 2d patch set (https://review.openstack.org/#/c/80539/2/neutron/db/metering/metering_db.py). You consider that this comments are incorrect? Also I didn\u0027t run into any error after running this migrations. http://paste.openstack.org/show/74937/","commit_id":"90362cd16941051bc19a3119d1d1e5da4041f28b"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"0976a873de93d38c8696312bde4290fb4ed5d69c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":50,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":51,"context_line":"        return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    op.alter_column(\u0027meteringlabels\u0027, \u0027description\u0027, type_\u003dsa.String(255),"},{"line_number":54,"context_line":"                    existing_nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F9oQA%3D","line":52,"in_reply_to":"AAAAWH%2F9op4%3D","updated":"2014-04-03 08:51:05.000000000","message":"No, that comment was correct. But could you say what do you think about this situation: http://paste.openstack.org/show/74941/\n\nYour the dowgrade code will not work if we have a row where a length of value in the meteringlabels column is more than 255.\n\nNow we can have the error if we would like to run downgrade.\n\nSorry if I didn\u0027t understand you.","commit_id":"90362cd16941051bc19a3119d1d1e5da4041f28b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"4a880109c76fb43bf352a4ad9d7e6a536e721932","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                func.substr(description, 1, 255))],"},{"line_number":62,"context_line":"                               else_\u003ddescription)}))"},{"line_number":63,"context_line":"    op.alter_column(\u0027meteringlabels\u0027, \u0027description\u0027, type_\u003dsa.String(255),"},{"line_number":64,"context_line":"                    existing_nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F9Tb0%3D","line":64,"updated":"2014-04-07 08:51:46.000000000","message":"This is a bug of db migration and we don\u0027t need downgrade migration to truncate the field. IMO upgrade() only is good in this case. Thought?\n\nIn addition, we can fix the original length to 1024 in addition to upgrade() in this migration too.","commit_id":"707ee95236ca590ea356cd8efb9efcebde96771f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"627f928c93728852b78b6425c96654a9f6df2cc2","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                func.substr(description, 1, 255))],"},{"line_number":62,"context_line":"                               else_\u003ddescription)}))"},{"line_number":63,"context_line":"    op.alter_column(\u0027meteringlabels\u0027, \u0027description\u0027, type_\u003dsa.String(255),"},{"line_number":64,"context_line":"                    existing_nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWn%2F%2F9uA%3D","line":64,"in_reply_to":"AAAAWH%2F9Tb0%3D","updated":"2014-04-08 08:06:32.000000000","message":"downgrade in migration should set database to previous state and every migration should contain it.","commit_id":"707ee95236ca590ea356cd8efb9efcebde96771f"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"16e50d3f6cdb80ec89e93daba640827eb662c64c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                func.substr(description, 1, 255))],"},{"line_number":62,"context_line":"                               else_\u003ddescription)}))"},{"line_number":63,"context_line":"    op.alter_column(\u0027meteringlabels\u0027, \u0027description\u0027, type_\u003dsa.String(255),"},{"line_number":64,"context_line":"                    existing_nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWn%2F%2F9aI%3D","line":64,"in_reply_to":"AAAAWn%2F%2F9sE%3D","updated":"2014-04-08 08:49:17.000000000","message":"Thanks for detailed explanation now I understand what you mean. I will correct in next patch set.","commit_id":"707ee95236ca590ea356cd8efb9efcebde96771f"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"c2c86156ecb241e341481baf13c3c3f0a1162ad4","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                func.substr(description, 1, 255))],"},{"line_number":62,"context_line":"                               else_\u003ddescription)}))"},{"line_number":63,"context_line":"    op.alter_column(\u0027meteringlabels\u0027, \u0027description\u0027, type_\u003dsa.String(255),"},{"line_number":64,"context_line":"                    existing_nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWn%2F%2F9sE%3D","line":64,"in_reply_to":"AAAAWn%2F%2F9uA%3D","updated":"2014-04-08 08:10:51.000000000","message":"I don\u0027t think it is true in this case. If an operator already deploys metering feature and they didn\u0027t run db migration and depends on db schema auto generation, they will lose the previous state (they already uses 1024 chars). If we have correct migration from first, this state change is unnecessary. This is the heart of my previous comment.","commit_id":"707ee95236ca590ea356cd8efb9efcebde96771f"}],"neutron/db/migration/alembic_migrations/versions/b65aa907aec_set_length_of_protocol_field.py":[{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"8df6920c4f989b5503d369b44f35aa6a2f4db44c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    op.alter_column(\u0027firewall_rules\u0027, \u0027protocol\u0027, type_\u003dsa.String(24),"},{"line_number":54,"context_line":"                    existing_nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F9o0Q%3D","line":54,"updated":"2014-04-03 06:56:14.000000000","message":"ditto","commit_id":"90362cd16941051bc19a3119d1d1e5da4041f28b"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"cc58299341d42451d872b8d557a178d4f1c2590b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    op.alter_column(\u0027firewall_rules\u0027, \u0027protocol\u0027, type_\u003dsa.String(24),"},{"line_number":54,"context_line":"                    existing_nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F9on0%3D","line":54,"in_reply_to":"AAAAWH%2F9o0Q%3D","updated":"2014-04-03 08:25:58.000000000","message":"Here I set length 40 which is less than 255. I think that this could not cause any problem.","commit_id":"90362cd16941051bc19a3119d1d1e5da4041f28b"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"0976a873de93d38c8696312bde4290fb4ed5d69c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    op.alter_column(\u0027firewall_rules\u0027, \u0027protocol\u0027, type_\u003dsa.String(24),"},{"line_number":54,"context_line":"                    existing_nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F9oOI%3D","line":54,"in_reply_to":"AAAAWH%2F9on0%3D","updated":"2014-04-03 08:51:05.000000000","message":"No. In the upgrade function you have set a length of column to 40 but in the downgrade function to 25. 25 is less than 40.","commit_id":"90362cd16941051bc19a3119d1d1e5da4041f28b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"4a880109c76fb43bf352a4ad9d7e6a536e721932","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":54,"context_line":"        return"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    firewall_rules \u003d table(\u0027firewall_rules\u0027, column(\u0027protocol\u0027,"},{"line_number":57,"context_line":"                                                    sa.String(24)))"},{"line_number":58,"context_line":"    protocol \u003d firewall_rules.columns[\u0027protocol\u0027]"},{"line_number":59,"context_line":"    op.execute(firewall_rules.update(values\u003d{"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F9TbY%3D","line":56,"updated":"2014-04-07 08:51:46.000000000","message":"Ditto","commit_id":"707ee95236ca590ea356cd8efb9efcebde96771f"}]}
