)]}'
{"neutron/db/migration/alembic_migrations/versions/41662e32bce2_l3_dvr_snat_mapping.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"74fe428fd74cd28f859b60dc823a9e7069c08cbf","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    if not migration.schema_has_table(\u0027csnat_l3_agent_bindings\u0027):"},{"line_number":39,"context_line":"        # In the database we are migrating from, the configured plugin"},{"line_number":40,"context_line":"        # did not create the csnat_l3_agent_bindings table."},{"line_number":41,"context_line":"        return"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    with migration.remove_fks_from_table(TABLE_NAME):"},{"line_number":44,"context_line":"        op.drop_constraint(name\u003d\u0027primary\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_becb5351","line":41,"updated":"2014-12-24 08:54:41.000000000","message":"I\u0027m curious how is this possible?","commit_id":"8fbbcce47d01eb72b93b88028721322d873499b3"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"74fe428fd74cd28f859b60dc823a9e7069c08cbf","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        return"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    with migration.remove_fks_from_table(TABLE_NAME):"},{"line_number":44,"context_line":"        op.drop_constraint(name\u003d\u0027primary\u0027,"},{"line_number":45,"context_line":"                           table_name\u003dTABLE_NAME,"},{"line_number":46,"context_line":"                           type_\u003d\u0027primary\u0027)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_feaa3b6f","line":44,"updated":"2014-12-24 08:54:41.000000000","message":"Why \u0027primary\u0027? This is not the name that this pk has on PostgreSQL. So this migration should check what is the name, before dropping.","commit_id":"8fbbcce47d01eb72b93b88028721322d873499b3"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"f92c637a15d3e2bb3bb425f96eb64dde24615542","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        return"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    with migration.remove_fks_from_table(TABLE_NAME):"},{"line_number":44,"context_line":"        op.drop_constraint(name\u003d\u0027primary\u0027,"},{"line_number":45,"context_line":"                           table_name\u003dTABLE_NAME,"},{"line_number":46,"context_line":"                           type_\u003d\u0027primary\u0027)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_0c5ef779","line":44,"in_reply_to":"3a961159_feaa3b6f","updated":"2014-12-24 21:36:41.000000000","message":"Ann: what is the name you see in PostgreSQL? \n I will try with csnat_l3_agent_bindings_pkey in the next patch.","commit_id":"8fbbcce47d01eb72b93b88028721322d873499b3"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"74fe428fd74cd28f859b60dc823a9e7069c08cbf","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                           table_name\u003dTABLE_NAME,"},{"line_number":62,"context_line":"                           type_\u003d\u0027primary\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        op.create_primary_key(name\u003d\u0027None\u0027,"},{"line_number":65,"context_line":"                              table_name\u003dTABLE_NAME,"},{"line_number":66,"context_line":"                              cols\u003d[\u0027router_id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1ebd47b1","line":64,"updated":"2014-12-24 08:54:41.000000000","message":"Why None? Moreover why \u0027None\u0027?","commit_id":"8fbbcce47d01eb72b93b88028721322d873499b3"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"f92c637a15d3e2bb3bb425f96eb64dde24615542","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                           table_name\u003dTABLE_NAME,"},{"line_number":62,"context_line":"                           type_\u003d\u0027primary\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        op.create_primary_key(name\u003d\u0027None\u0027,"},{"line_number":65,"context_line":"                              table_name\u003dTABLE_NAME,"},{"line_number":66,"context_line":"                              cols\u003d[\u0027router_id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_2cf1f36a","line":64,"in_reply_to":"3a961159_1ebd47b1","updated":"2014-12-24 21:36:41.000000000","message":"if the name is specified as \u0027None\u0027 the name is generated by the system. So this should match the state of schema as would have been, because no name was specified in the script that creates this table.\nhttps://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/versions/5589aa32bf80_l3_dvr_scheduler.py","commit_id":"8fbbcce47d01eb72b93b88028721322d873499b3"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"e55f5b2498ec27f03bd46227a404fec2624f68f7","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def upgrade():"},{"line_number":38,"context_line":"    if not migration.schema_has_table(\u0027csnat_l3_agent_bindings\u0027):"},{"line_number":39,"context_line":"        # In the database we are migrating from, the configured plugin"},{"line_number":40,"context_line":"        # did not create the csnat_l3_agent_bindings table."},{"line_number":41,"context_line":"        return"},{"line_number":42,"context_line":"    context \u003d op.get_context()"},{"line_number":43,"context_line":"    if context.bind.dialect.name in (\u0027postgresql\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_e1552c1f","line":40,"updated":"2014-12-25 11:36:06.000000000","message":"My question about have this is possible is not answered. This table was created in migration without any conditions so it is really interesting how this happen https://github.com/openstack/neutron/blob/696ff699475c956b116c46c59d45c245e9ee37db/neutron/db/migration/alembic_migrations/versions/5589aa32bf80_l3_dvr_scheduler.py#L34","commit_id":"fd50a6e984b9bdc2e0c30906b93c46031ef6f93a"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"ae5763d96cb22e84890254d5c5fc1027a7b60dea","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def upgrade():"},{"line_number":38,"context_line":"    if not migration.schema_has_table(\u0027csnat_l3_agent_bindings\u0027):"},{"line_number":39,"context_line":"        # In the database we are migrating from, the configured plugin"},{"line_number":40,"context_line":"        # did not create the csnat_l3_agent_bindings table."},{"line_number":41,"context_line":"        return"},{"line_number":42,"context_line":"    context \u003d op.get_context()"},{"line_number":43,"context_line":"    if context.bind.dialect.name in (\u0027postgresql\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_4598a26a","line":40,"in_reply_to":"3a961159_e1552c1f","updated":"2014-12-29 20:51:48.000000000","message":"I have taken the check out because the script you pointed out runs unconditionally.","commit_id":"fd50a6e984b9bdc2e0c30906b93c46031ef6f93a"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"dd6986a8ea3437367314a3a64e25200a6a87a64f","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        # did not create the csnat_l3_agent_bindings table."},{"line_number":41,"context_line":"        return"},{"line_number":42,"context_line":"    context \u003d op.get_context()"},{"line_number":43,"context_line":"    if context.bind.dialect.name in (\u0027postgresql\u0027):"},{"line_number":44,"context_line":"        prev_pk_name \u003d \u0027csnat_l3_agent_bindings_pkey\u0027"},{"line_number":45,"context_line":"    else:"},{"line_number":46,"context_line":"        prev_pk_name \u003d \u0027primary\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_7632c4f3","line":43,"updated":"2014-12-29 02:51:04.000000000","message":"Line 43 to 46 may not work for DB other than postgresql or mysql. For example, in DB2 the primary key name is neither csnat_l3_agent_bindings_pkey nor primary. Can you consider to use something like get_pk_constraint in sqlalchemy?\n\nhttp://docs.sqlalchemy.org/en/rel_0_9/core/internals.html#sqlalchemy.engine.default.DefaultDialect.get_pk_constraint","commit_id":"fd50a6e984b9bdc2e0c30906b93c46031ef6f93a"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"ae5763d96cb22e84890254d5c5fc1027a7b60dea","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        # did not create the csnat_l3_agent_bindings table."},{"line_number":41,"context_line":"        return"},{"line_number":42,"context_line":"    context \u003d op.get_context()"},{"line_number":43,"context_line":"    if context.bind.dialect.name in (\u0027postgresql\u0027):"},{"line_number":44,"context_line":"        prev_pk_name \u003d \u0027csnat_l3_agent_bindings_pkey\u0027"},{"line_number":45,"context_line":"    else:"},{"line_number":46,"context_line":"        prev_pk_name \u003d \u0027primary\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_85a1aa97","line":43,"in_reply_to":"3a961159_7632c4f3","updated":"2014-12-29 20:51:48.000000000","message":"Xu Han: updated the patch with what you suggested.","commit_id":"fd50a6e984b9bdc2e0c30906b93c46031ef6f93a"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"e55f5b2498ec27f03bd46227a404fec2624f68f7","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                           table_name\u003dTABLE_NAME,"},{"line_number":67,"context_line":"                           type_\u003d\u0027primary\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        op.create_primary_key(name\u003d\u0027None\u0027,"},{"line_number":70,"context_line":"                              table_name\u003dTABLE_NAME,"},{"line_number":71,"context_line":"                              cols\u003d[\u0027router_id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_a17404d1","line":69,"updated":"2014-12-25 11:36:06.000000000","message":"If you want to generate pk name automatically, you should use None not \u0027None\u0027, this is what I mean by my comment to last patch set. Now it is http://paste.openstack.org/show/154599/. And running upgrade-\u003edowngrade-\u003eupgrade for this migration is failed.","commit_id":"fd50a6e984b9bdc2e0c30906b93c46031ef6f93a"},{"author":{"_account_id":9077,"name":"Rajeev Grover","email":"rgrover687@gmail.com","username":"rajeev"},"change_message_id":"ae5763d96cb22e84890254d5c5fc1027a7b60dea","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                           table_name\u003dTABLE_NAME,"},{"line_number":67,"context_line":"                           type_\u003d\u0027primary\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        op.create_primary_key(name\u003d\u0027None\u0027,"},{"line_number":70,"context_line":"                              table_name\u003dTABLE_NAME,"},{"line_number":71,"context_line":"                              cols\u003d[\u0027router_id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_c5abb273","line":69,"in_reply_to":"3a961159_a17404d1","updated":"2014-12-29 20:51:48.000000000","message":"Done","commit_id":"fd50a6e984b9bdc2e0c30906b93c46031ef6f93a"}]}
