)]}'
{"neutron/db/migration/alembic_migrations/versions/31d7f831a591_add_constraint_for_routerid.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"44d6bdcd1630895ed37c2564385388dd568a29e2","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from alembic import op"},{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":"from sqlalchemy.engine.reflection import Inspector"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"TABLE_NAME \u003d \u0027routerl3agentbindings\u0027"},{"line_number":33,"context_line":"PK_NAME \u003d \u0027pk_routerl3agentbindings\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_6006001f","line":30,"updated":"2014-09-26 08:08:36.000000000","message":"Although it passed Jenkins, importing class is not ok.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e12b4020b5d86a6ac64837fd8e8191d55440389","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from alembic import op"},{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":"from sqlalchemy.engine.reflection import Inspector"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"TABLE_NAME \u003d \u0027routerl3agentbindings\u0027"},{"line_number":33,"context_line":"PK_NAME \u003d \u0027pk_routerl3agentbindings\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_e1d7e9bd","line":30,"in_reply_to":"baa201ad_269027ec","updated":"2014-09-29 14:43:29.000000000","message":"I\u0027ll fix this.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"d900749f2b786443fce2b6fe419077092eddb08a","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from alembic import op"},{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":"from sqlalchemy.engine.reflection import Inspector"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"TABLE_NAME \u003d \u0027routerl3agentbindings\u0027"},{"line_number":33,"context_line":"PK_NAME \u003d \u0027pk_routerl3agentbindings\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_269027ec","line":30,"in_reply_to":"baa201ad_449a8e15","updated":"2014-09-29 14:30:01.000000000","message":"I took a look at all of the migration scripts. I did find a couple of imports in a few of the other migration scripts, but I agree that there were not that many. I am not sure how to support DB2 (and its randomly generated foreign key names) without importing this class.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"95fe08b3b12ba560d808e64b0496687d1d7d400d","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from alembic import op"},{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":"from sqlalchemy.engine.reflection import Inspector"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"TABLE_NAME \u003d \u0027routerl3agentbindings\u0027"},{"line_number":33,"context_line":"PK_NAME \u003d \u0027pk_routerl3agentbindings\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_fcc78e62","line":30,"in_reply_to":"baa201ad_9cf842e7","updated":"2014-09-29 14:53:43.000000000","message":"Yes, I misunderstood.  Matt has fixed this as you suggested.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"77e0f738076ba826c963828918841f3b4eb61332","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from alembic import op"},{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":"from sqlalchemy.engine.reflection import Inspector"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"TABLE_NAME \u003d \u0027routerl3agentbindings\u0027"},{"line_number":33,"context_line":"PK_NAME \u003d \u0027pk_routerl3agentbindings\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_9cf842e7","line":30,"in_reply_to":"baa201ad_e1d7e9bd","updated":"2014-09-29 14:49:18.000000000","message":"Seems that you misunderstand me. I mean do not import class, import sqlachemy and then use inspector \u003d sqlalchemy.engine.reflection.Inspector.from_engine(bind)","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9fe395b662ef43ada336cba8d5fbe08ff723022c","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from alembic import op"},{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":"from sqlalchemy.engine.reflection import Inspector"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"TABLE_NAME \u003d \u0027routerl3agentbindings\u0027"},{"line_number":33,"context_line":"PK_NAME \u003d \u0027pk_routerl3agentbindings\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_449a8e15","line":30,"in_reply_to":"da9df570_5ac1e052","updated":"2014-09-29 08:06:44.000000000","message":"Check out there is no migration that import class. So, please, do not do this here.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dd5bf4118bc27880d7a17ac6f4147a55dcaaf1a3","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from alembic import op"},{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":"from sqlalchemy.engine.reflection import Inspector"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"TABLE_NAME \u003d \u0027routerl3agentbindings\u0027"},{"line_number":33,"context_line":"PK_NAME \u003d \u0027pk_routerl3agentbindings\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_5ac1e052","line":30,"in_reply_to":"da9df570_6006001f","updated":"2014-09-26 15:10:12.000000000","message":"I think there are exceptions for the sqlalchemy classes in the hacking check.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5817cc8a84708eeadd377e8d640ed07b1a55bfdd","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    op.drop_column(TABLE_NAME, \u0027id\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    #DB2 doesn\u0027t support nullable column in primary key"},{"line_number":70,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":71,"context_line":"        op.alter_column("},{"line_number":72,"context_line":"            table_name\u003dTABLE_NAME,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_555c6eed","line":69,"updated":"2014-09-25 19:09:34.000000000","message":"Pretty sure there is a hacking/pep8 check that wants a space after #.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e12b4020b5d86a6ac64837fd8e8191d55440389","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    op.drop_column(TABLE_NAME, \u0027id\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    #DB2 doesn\u0027t support nullable column in primary key"},{"line_number":70,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":71,"context_line":"        op.alter_column("},{"line_number":72,"context_line":"            table_name\u003dTABLE_NAME,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_21e2d19f","line":69,"in_reply_to":"baa201ad_0681638f","updated":"2014-09-29 14:43:29.000000000","message":"I\u0027ll get it.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"d900749f2b786443fce2b6fe419077092eddb08a","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    op.drop_column(TABLE_NAME, \u0027id\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    #DB2 doesn\u0027t support nullable column in primary key"},{"line_number":70,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":71,"context_line":"        op.alter_column("},{"line_number":72,"context_line":"            table_name\u003dTABLE_NAME,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_0681638f","line":69,"in_reply_to":"da9df570_555c6eed","updated":"2014-09-29 14:30:01.000000000","message":"pep8 checks did not complain about this statement, but I will correct it in the next patch.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5817cc8a84708eeadd377e8d640ed07b1a55bfdd","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    # Drop the existed foreign key constraints"},{"line_number":96,"context_line":"    # In order to perform primary key changes"},{"line_number":97,"context_line":"    db2fks \u003d {}"},{"line_number":98,"context_line":"    if dialect \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_35252a5c","line":98,"updated":"2014-09-25 19:09:34.000000000","message":"Should probably add a note why this is necessary.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"d900749f2b786443fce2b6fe419077092eddb08a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    # Drop the existed foreign key constraints"},{"line_number":96,"context_line":"    # In order to perform primary key changes"},{"line_number":97,"context_line":"    db2fks \u003d {}"},{"line_number":98,"context_line":"    if dialect \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_267e67af","line":98,"in_reply_to":"da9df570_35252a5c","updated":"2014-09-29 14:30:01.000000000","message":"Done","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"b8fec131d5850275dd12dedf6c11331685f1bd64","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    # In order to perform primary key changes"},{"line_number":97,"context_line":"    db2fks \u003d {}"},{"line_number":98,"context_line":"    if dialect \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("},{"line_number":102,"context_line":"                name \u003d fk.get(\u0027name\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_e7504bd6","line":99,"updated":"2014-09-26 03:50:44.000000000","message":"I wonder if this line works for mysql and postgresql as well so the else below is not needed?","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"d900749f2b786443fce2b6fe419077092eddb08a","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    # In order to perform primary key changes"},{"line_number":97,"context_line":"    db2fks \u003d {}"},{"line_number":98,"context_line":"    if dialect \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("},{"line_number":102,"context_line":"                name \u003d fk.get(\u0027name\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_41827553","line":99,"in_reply_to":"baa201ad_6444f274","updated":"2014-09-29 14:30:01.000000000","message":"As stated by Matt Riedemann, the FK names are randomly generated in DB2.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dd5bf4118bc27880d7a17ac6f4147a55dcaaf1a3","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    # In order to perform primary key changes"},{"line_number":97,"context_line":"    db2fks \u003d {}"},{"line_number":98,"context_line":"    if dialect \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("},{"line_number":102,"context_line":"                name \u003d fk.get(\u0027name\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_da931059","line":99,"in_reply_to":"da9df570_80dbe44d","updated":"2014-09-26 15:10:12.000000000","message":"Yeah the name of the foreign keys could probably be figured out for DB2, are they not explicitly named when they were created?  Otherwise the ibm_db_sa code should provide a standard naming convention.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9fe395b662ef43ada336cba8d5fbe08ff723022c","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    # In order to perform primary key changes"},{"line_number":97,"context_line":"    db2fks \u003d {}"},{"line_number":98,"context_line":"    if dialect \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("},{"line_number":102,"context_line":"                name \u003d fk.get(\u0027name\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_6444f274","line":99,"in_reply_to":"da9df570_ca3ed0d9","updated":"2014-09-29 08:06:44.000000000","message":"I\u0027m not familiar with ibm_db_sa, so if it is the only way I think this is acceptable.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d17255dd297f5c08405b18d4142f43f734d3cb16","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    # In order to perform primary key changes"},{"line_number":97,"context_line":"    db2fks \u003d {}"},{"line_number":98,"context_line":"    if dialect \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("},{"line_number":102,"context_line":"                name \u003d fk.get(\u0027name\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_ca3ed0d9","line":99,"in_reply_to":"da9df570_da931059","updated":"2014-09-27 14:05:10.000000000","message":"Nevermind, the FK names are randomly generated in DB2, they start with something like SQL and then have a random integer after that.  So unless you explicitly name the foreign keys when they are created, you have to figure them out from the database based on what table they\u0027re on and the columns.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"44d6bdcd1630895ed37c2564385388dd568a29e2","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    # In order to perform primary key changes"},{"line_number":97,"context_line":"    db2fks \u003d {}"},{"line_number":98,"context_line":"    if dialect \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("},{"line_number":102,"context_line":"                name \u003d fk.get(\u0027name\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_80dbe44d","line":99,"in_reply_to":"da9df570_e7504bd6","updated":"2014-09-26 08:08:36.000000000","message":"This will work for mysql,postgresql. But this works only in online mode. In fact Juno do not support offline migrations, so this is possible to use it, but if it is the only way. Cannot name of foreign key in ibm_db_sa be found and used the same constructions as for postgres and mysql? (fk_names)","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"44d6bdcd1630895ed37c2564385388dd568a29e2","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("},{"line_number":102,"context_line":"                name \u003d fk.get(\u0027name\u0027),"},{"line_number":103,"context_line":"                table_name\u003dTABLE_NAME,"},{"line_number":104,"context_line":"                type_\u003d\u0027foreignkey\u0027"},{"line_number":105,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_0049b45f","line":102,"updated":"2014-09-26 08:08:36.000000000","message":"Extra spaces around \u0027\u003d\u0027.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"d900749f2b786443fce2b6fe419077092eddb08a","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("},{"line_number":102,"context_line":"                name \u003d fk.get(\u0027name\u0027),"},{"line_number":103,"context_line":"                table_name\u003dTABLE_NAME,"},{"line_number":104,"context_line":"                type_\u003d\u0027foreignkey\u0027"},{"line_number":105,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_c16745e9","line":102,"in_reply_to":"da9df570_0049b45f","updated":"2014-09-29 14:30:01.000000000","message":"Done","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d17255dd297f5c08405b18d4142f43f734d3cb16","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        db2fks \u003d inspector.get_foreign_keys(TABLE_NAME)"},{"line_number":100,"context_line":"        for fk in db2fks:"},{"line_number":101,"context_line":"            op.drop_constraint("},{"line_number":102,"context_line":"                name \u003d fk.get(\u0027name\u0027),"},{"line_number":103,"context_line":"                table_name\u003dTABLE_NAME,"},{"line_number":104,"context_line":"                type_\u003d\u0027foreignkey\u0027"},{"line_number":105,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_0a2458c3","line":102,"in_reply_to":"da9df570_0049b45f","updated":"2014-09-27 14:05:10.000000000","message":"Yeah I expect this doesn\u0027t work using kwargs with the spaces.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"99afa97d940f9f5c93a326a62d99f3b7d22ebb39","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    context \u003d op.get_context()"},{"line_number":92,"context_line":"    dialect \u003d context.bind.dialect.name"},{"line_number":93,"context_line":"    inspector \u003d reflection.Inspector.from_engine(op.get_bind().engine)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    # Drop the existed foreign key constraints"},{"line_number":96,"context_line":"    # In order to perform primary key changes"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_2262d0d8","line":93,"updated":"2014-09-29 15:08:27.000000000","message":"\"inspector\" is only needed on line 104.   This assignment statement is not needed for the other DB backends and should be moved out of the main line path.","commit_id":"e2d9ce92c4e251a86fafe8586395a6540be825a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fa678379fcdb10822b01ad013a6c19dbf3c3c5bd","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    context \u003d op.get_context()"},{"line_number":92,"context_line":"    dialect \u003d context.bind.dialect.name"},{"line_number":93,"context_line":"    inspector \u003d reflection.Inspector.from_engine(op.get_bind().engine)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    # Drop the existed foreign key constraints"},{"line_number":96,"context_line":"    # In order to perform primary key changes"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_8230dc57","line":93,"in_reply_to":"baa201ad_2262d0d8","updated":"2014-09-29 15:17:28.000000000","message":"Done","commit_id":"e2d9ce92c4e251a86fafe8586395a6540be825a0"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9343a24bee74c8f833e3841a3a6de1bf47745ddb","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        op.alter_column("},{"line_number":72,"context_line":"            table_name\u003dTABLE_NAME,"},{"line_number":73,"context_line":"            column_name\u003d\u0027router_id\u0027,"},{"line_number":74,"context_line":"            nullable\u003dFalse"},{"line_number":75,"context_line":"        )"},{"line_number":76,"context_line":"        op.alter_column("},{"line_number":77,"context_line":"            table_name\u003dTABLE_NAME,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_15ba52de","line":74,"updated":"2014-09-30 07:13:58.000000000","message":"Why is not existing_type mentioned here?","commit_id":"c048d3fb480cbd9033152c745802691876b7ba0d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1de549df51594848a14e68b097b9af5ff3ccc566","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        op.alter_column("},{"line_number":72,"context_line":"            table_name\u003dTABLE_NAME,"},{"line_number":73,"context_line":"            column_name\u003d\u0027router_id\u0027,"},{"line_number":74,"context_line":"            nullable\u003dFalse"},{"line_number":75,"context_line":"        )"},{"line_number":76,"context_line":"        op.alter_column("},{"line_number":77,"context_line":"            table_name\u003dTABLE_NAME,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_c2c1e7e5","line":74,"in_reply_to":"baa201ad_15ba52de","updated":"2014-09-30 14:20:13.000000000","message":"Why does it need to be?","commit_id":"c048d3fb480cbd9033152c745802691876b7ba0d"},{"author":{"_account_id":9970,"name":"John Kasperski","email":"jckasper@linux.vnet.ibm.com","username":"jckasper"},"change_message_id":"caf56db8d524d2e16bf81e5891daaec26243b23c","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        op.alter_column("},{"line_number":72,"context_line":"            table_name\u003dTABLE_NAME,"},{"line_number":73,"context_line":"            column_name\u003d\u0027router_id\u0027,"},{"line_number":74,"context_line":"            nullable\u003dFalse"},{"line_number":75,"context_line":"        )"},{"line_number":76,"context_line":"        op.alter_column("},{"line_number":77,"context_line":"            table_name\u003dTABLE_NAME,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_dd0c6897","line":74,"in_reply_to":"baa201ad_a2186385","updated":"2014-09-30 14:42:49.000000000","message":"The creation of \u0027routerl3agentbindings\u0027 (TABLE_NAME) is done here:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/l3_init_ops.py#L72","commit_id":"c048d3fb480cbd9033152c745802691876b7ba0d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec6d96f1f990606946dd09abd91fdb980e487b64","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        op.alter_column("},{"line_number":72,"context_line":"            table_name\u003dTABLE_NAME,"},{"line_number":73,"context_line":"            column_name\u003d\u0027router_id\u0027,"},{"line_number":74,"context_line":"            nullable\u003dFalse"},{"line_number":75,"context_line":"        )"},{"line_number":76,"context_line":"        op.alter_column("},{"line_number":77,"context_line":"            table_name\u003dTABLE_NAME,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_a2186385","line":74,"in_reply_to":"baa201ad_c2c1e7e5","updated":"2014-09-30 14:22:55.000000000","message":"From the docs, I could see where this is tempting:\n\nhttp://alembic.readthedocs.org/en/latest/ops.html\n\n\"existing_type – Optional; a TypeEngine type object to specify the previous type. This is required for all MySQL column alter operations that don’t otherwise specify a new type, as well as for when nullability is being changed on a SQL Server column. It is also used if the type is a so-called SQLlchemy “schema” type which may define a constraint (i.e. Boolean, Enum), so that the constraint can be dropped.\"\n\nHowever, this is not mysql or MS SQL server.","commit_id":"c048d3fb480cbd9033152c745802691876b7ba0d"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"6798eac5113b14cbe43e7ddd0547ba90f50ab01f","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        op.alter_column("},{"line_number":72,"context_line":"            table_name\u003dTABLE_NAME,"},{"line_number":73,"context_line":"            column_name\u003d\u0027router_id\u0027,"},{"line_number":74,"context_line":"            nullable\u003dFalse"},{"line_number":75,"context_line":"        )"},{"line_number":76,"context_line":"        op.alter_column("},{"line_number":77,"context_line":"            table_name\u003dTABLE_NAME,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_58e7a640","line":74,"in_reply_to":"baa201ad_dd0c6897","updated":"2014-09-30 15:02:22.000000000","message":"Ok, I forgot that this alter_column is done only if it is  ibm_db_sa.","commit_id":"c048d3fb480cbd9033152c745802691876b7ba0d"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9343a24bee74c8f833e3841a3a6de1bf47745ddb","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        op.alter_column("},{"line_number":77,"context_line":"            table_name\u003dTABLE_NAME,"},{"line_number":78,"context_line":"            column_name\u003d\u0027l3_agent_id\u0027,"},{"line_number":79,"context_line":"            nullable\u003dFalse"},{"line_number":80,"context_line":"        )"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    op.create_primary_key("}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_55cbfa71","line":79,"updated":"2014-09-30 07:13:58.000000000","message":"The same","commit_id":"c048d3fb480cbd9033152c745802691876b7ba0d"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9343a24bee74c8f833e3841a3a6de1bf47745ddb","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        op.alter_column("},{"line_number":137,"context_line":"            table_name\u003dTABLE_NAME,"},{"line_number":138,"context_line":"            column_name\u003d\u0027id\u0027,"},{"line_number":139,"context_line":"            nullable\u003dFalse"},{"line_number":140,"context_line":"        )"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    op.create_primary_key("}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_b5a186ab","line":139,"updated":"2014-09-30 07:13:58.000000000","message":"The same","commit_id":"c048d3fb480cbd9033152c745802691876b7ba0d"}],"neutron/db/migration/alembic_migrations/versions/3927f7f7c456_l3_extension_distributed_mode.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5817cc8a84708eeadd377e8d640ed07b1a55bfdd","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":43,"context_line":"        op.execute(\"INSERT INTO router_extra_attributes \""},{"line_number":44,"context_line":"              \"SELECT id as router_id, \""},{"line_number":45,"context_line":"              \"0 as distributed from routers\")"},{"line_number":46,"context_line":"    else:"},{"line_number":47,"context_line":"        op.execute(\"INSERT INTO router_extra_attributes \""},{"line_number":48,"context_line":"              \"SELECT id as router_id, \""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_757ed21a","line":45,"updated":"2014-09-25 19:09:34.000000000","message":"Can\u0027t we convert this statement to using the sa.false() function which is translated to 0 by the ibm_db_sa dialect code?  Then we don\u0027t need the condition.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dd5bf4118bc27880d7a17ac6f4147a55dcaaf1a3","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":43,"context_line":"        op.execute(\"INSERT INTO router_extra_attributes \""},{"line_number":44,"context_line":"              \"SELECT id as router_id, \""},{"line_number":45,"context_line":"              \"0 as distributed from routers\")"},{"line_number":46,"context_line":"    else:"},{"line_number":47,"context_line":"        op.execute(\"INSERT INTO router_extra_attributes \""},{"line_number":48,"context_line":"              \"SELECT id as router_id, \""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_5a8f202a","line":45,"in_reply_to":"da9df570_47dcb746","updated":"2014-09-26 15:10:12.000000000","message":"Yeah.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d17255dd297f5c08405b18d4142f43f734d3cb16","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":43,"context_line":"        op.execute(\"INSERT INTO router_extra_attributes \""},{"line_number":44,"context_line":"              \"SELECT id as router_id, \""},{"line_number":45,"context_line":"              \"0 as distributed from routers\")"},{"line_number":46,"context_line":"    else:"},{"line_number":47,"context_line":"        op.execute(\"INSERT INTO router_extra_attributes \""},{"line_number":48,"context_line":"              \"SELECT id as router_id, \""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_2a2d9ca8","line":45,"in_reply_to":"da9df570_5a8f202a","updated":"2014-09-27 14:05:10.000000000","message":"This might not work as I was thinking, I was thinking more of a query statement like select().where(t.c.foo \u003d\u003d sqla.sa.true()).execute(), not like a straight sql command execution here.  That probably doesn\u0027t work the same way.","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"3e2b22bc7fce0ef44c73f17ababadb8779cb7d23","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    if context.bind.dialect.name \u003d\u003d \u0027ibm_db_sa\u0027:"},{"line_number":43,"context_line":"        op.execute(\"INSERT INTO router_extra_attributes \""},{"line_number":44,"context_line":"              \"SELECT id as router_id, \""},{"line_number":45,"context_line":"              \"0 as distributed from routers\")"},{"line_number":46,"context_line":"    else:"},{"line_number":47,"context_line":"        op.execute(\"INSERT INTO router_extra_attributes \""},{"line_number":48,"context_line":"              \"SELECT id as router_id, \""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_47dcb746","line":45,"in_reply_to":"da9df570_757ed21a","updated":"2014-09-26 03:55:55.000000000","message":"Matt, you mean sa.sql.false()?","commit_id":"e7ab1fcbde72957ebb86e9c81035063f298ee9d2"}]}
