)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"6cdf5ca4e9ba6925f27a65dbe054eb7e7e1bdd6d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ilya Pekelny \u003cipekelny@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-11-20 18:56:58 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"The correct check of `CHECK CONSTRAINT`"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Sqlalchemy emulates boolean data type in several different ways for"},{"line_number":10,"context_line":"different engines. In versions \u003e\u003d8.3 syntax is changed. Thus checking for"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2BtLs%3D","line":7,"updated":"2013-11-21 10:14:25.000000000","message":"Fix migrations changing the type of deleted column","commit_id":"2e21710f93dfac6d3abd64033ffcd8371989aa44"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"6cdf5ca4e9ba6925f27a65dbe054eb7e7e1bdd6d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"The correct check of `CHECK CONSTRAINT`"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Sqlalchemy emulates boolean data type in several different ways for"},{"line_number":10,"context_line":"different engines. In versions \u003e\u003d8.3 syntax is changed. Thus checking for"},{"line_number":11,"context_line":"constrains being deprecated. Added correct emulation way to the check in"},{"line_number":12,"context_line":"migrations and utils."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2BtF0%3D","line":9,"updated":"2013-11-21 10:14:25.000000000","message":"SQLite doesn\u0027t provide a native implementation of BOOLEAN data type. SQLAlchemy emulates BOOLEAN data type for SQLite using INT column + CHECK constraint.\n\nWe have a few migrations changing the type of column \u0027deleted\u0027 from BOOLEAN to INT. Due to limitations of ALTER in SQLite, in order to do that, we omit the original \u0027deleted\u0027 column as well as the corresponding CHECK constraint when recreating the table. Omitting of the constraint is more tricky. It\u0027s implemented by analyzing the SQL text used for its rendering. SQLAlchemy versions 0.8.3+ slightly changed the way constraints are rendered, so we have to update our migrations changing the type of \u0027deleted\u0027 column to work with SQLAlchemy 0.8.3+ on SQLite backend (we aren\u0027t using SQLite in production, but we still need it for running of unit tests).","commit_id":"2e21710f93dfac6d3abd64033ffcd8371989aa44"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"5e8427410b830ef7d327d7ace23c643b0563a689","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"The correct check of `CHECK CONSTRAINT`"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Sqlalchemy emulates boolean data type in several different ways for"},{"line_number":10,"context_line":"different engines. In versions \u003e\u003d8.3 syntax is changed. Thus checking for"},{"line_number":11,"context_line":"constrains being deprecated. Added correct emulation way to the check in"},{"line_number":12,"context_line":"migrations and utils."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2BtDU%3D","line":9,"in_reply_to":"AAAATn%2F%2BtF0%3D","updated":"2013-11-21 11:05:37.000000000","message":"Done","commit_id":"2e21710f93dfac6d3abd64033ffcd8371989aa44"}],"nova/db/sqlalchemy/migrate_repo/versions/152_change_type_of_deleted_column.py":[{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"3ba7e9686c4e42de07337d027ae7ffa791a6377d","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                                     default\u003ddefault_deleted_value)"},{"line_number":163,"context_line":"            columns.append(column_copy)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        def is_deleted_column_constraint(constraint):"},{"line_number":166,"context_line":"            # NOTE(boris-42): There is no other way to check is CheckConstraint"},{"line_number":167,"context_line":"            #                 associated with deleted column."},{"line_number":168,"context_line":"            if not isinstance(constraint, CheckConstraint):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BwJc%3D","side":"PARENT","line":165,"updated":"2013-11-20 17:02:54.000000000","message":"Actually I have questions. Why is it copy-pasted, instead of be imported? And, why is it so straight, i.e. shouldn\u0027t it be something like `is_column_constrainted`?","commit_id":"84bddb030cfbae255941e17f100c1e51c697dbe6"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"6cdf5ca4e9ba6925f27a65dbe054eb7e7e1bdd6d","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                                     default\u003ddefault_deleted_value)"},{"line_number":163,"context_line":"            columns.append(column_copy)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        def is_deleted_column_constraint(constraint):"},{"line_number":166,"context_line":"            # NOTE(boris-42): There is no other way to check is CheckConstraint"},{"line_number":167,"context_line":"            #                 associated with deleted column."},{"line_number":168,"context_line":"            if not isinstance(constraint, CheckConstraint):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BtMc%3D","side":"PARENT","line":165,"in_reply_to":"AAAATn%2F%2BwJc%3D","updated":"2013-11-21 10:14:25.000000000","message":"That\u0027s mostly because we are trying to change existing migrations as little as possible.","commit_id":"84bddb030cfbae255941e17f100c1e51c697dbe6"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"6cdf5ca4e9ba6925f27a65dbe054eb7e7e1bdd6d","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            if not isinstance(constraint, CheckConstraint):"},{"line_number":169,"context_line":"                return False"},{"line_number":170,"context_line":"            sqltext \u003d str(constraint.sqltext)"},{"line_number":171,"context_line":"            constraint_markers \u003d ("},{"line_number":172,"context_line":"                    \"deleted in (0, 1)\","},{"line_number":173,"context_line":"                    \"deleted IN (:deleted_1, :deleted_2)\","},{"line_number":174,"context_line":"                    \"deleted IN (:param_1, :param_2)\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BtMg%3D","line":171,"updated":"2013-11-21 10:14:25.000000000","message":"Could you fix indentation and use generator expression instead of map()?\n\nhttp://paste.openstack.org/show/53733/","commit_id":"2e21710f93dfac6d3abd64033ffcd8371989aa44"}],"nova/db/sqlalchemy/utils.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"6cdf5ca4e9ba6925f27a65dbe054eb7e7e1bdd6d","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        if not isinstance(constraint, CheckConstraint):"},{"line_number":515,"context_line":"            return False"},{"line_number":516,"context_line":"        sqltext \u003d str(constraint.sqltext)"},{"line_number":517,"context_line":"        constraint_markers \u003d ("},{"line_number":518,"context_line":"                \"deleted in (0, 1)\","},{"line_number":519,"context_line":"                \"deleted IN (:deleted_1, :deleted_2)\","},{"line_number":520,"context_line":"                \"deleted IN (:param_1, :param_2)\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BtM8%3D","line":517,"updated":"2013-11-21 10:14:25.000000000","message":"Could you fix indentation and use generator expression instead of map()?\n\nhttp://paste.openstack.org/show/53733/","commit_id":"2e21710f93dfac6d3abd64033ffcd8371989aa44"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"5e8427410b830ef7d327d7ace23c643b0563a689","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        if not isinstance(constraint, CheckConstraint):"},{"line_number":515,"context_line":"            return False"},{"line_number":516,"context_line":"        sqltext \u003d str(constraint.sqltext)"},{"line_number":517,"context_line":"        constraint_markers \u003d ("},{"line_number":518,"context_line":"                \"deleted in (0, 1)\","},{"line_number":519,"context_line":"                \"deleted IN (:deleted_1, :deleted_2)\","},{"line_number":520,"context_line":"                \"deleted IN (:param_1, :param_2)\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BtBE%3D","line":517,"in_reply_to":"AAAATn%2F%2BtM8%3D","updated":"2013-11-21 11:05:37.000000000","message":"Done","commit_id":"2e21710f93dfac6d3abd64033ffcd8371989aa44"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2b6dbe9c3c6a252ea69180c4d69636b7524be61c","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        if not isinstance(constraint, CheckConstraint):"},{"line_number":515,"context_line":"            return False"},{"line_number":516,"context_line":"        sqltext \u003d str(constraint.sqltext)"},{"line_number":517,"context_line":"        constraint_markers \u003d ("},{"line_number":518,"context_line":"            \"deleted in (0, 1)\","},{"line_number":519,"context_line":"            \"deleted IN (:deleted_1, :deleted_2)\","},{"line_number":520,"context_line":"            \"deleted IN (:param_1, :param_2)\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9ILM%3D","line":517,"updated":"2013-12-16 15:09:48.000000000","message":"it could be interesting to add a comment about that version problem.","commit_id":"1b7cc305cebe25f75062f91bd40847dcc4ff2f8d"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"cfffec713bb2f8054f4d259575e4036eb31ef642","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        if not isinstance(constraint, CheckConstraint):"},{"line_number":515,"context_line":"            return False"},{"line_number":516,"context_line":"        sqltext \u003d str(constraint.sqltext)"},{"line_number":517,"context_line":"        constraint_markers \u003d ("},{"line_number":518,"context_line":"            \"deleted in (0, 1)\","},{"line_number":519,"context_line":"            \"deleted IN (:deleted_1, :deleted_2)\","},{"line_number":520,"context_line":"            \"deleted IN (:param_1, :param_2)\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9H2o%3D","line":517,"in_reply_to":"AAAATn%2F9ILM%3D","updated":"2014-01-17 09:45:53.000000000","message":"Done","commit_id":"1b7cc305cebe25f75062f91bd40847dcc4ff2f8d"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2b6dbe9c3c6a252ea69180c4d69636b7524be61c","unresolved":false,"context_lines":[{"line_number":519,"context_line":"            \"deleted IN (:deleted_1, :deleted_2)\","},{"line_number":520,"context_line":"            \"deleted IN (:param_1, :param_2)\""},{"line_number":521,"context_line":"        )"},{"line_number":522,"context_line":"        return any(sqltext.endswith(marker) for marker in constraint_markers)"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    constraints \u003d []"},{"line_number":525,"context_line":"    for constraint in table.constraints:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9IK4%3D","line":522,"updated":"2013-12-16 15:09:48.000000000","message":"What do you think about to use a condition with the version?\n\nsqlachemy.__version__","commit_id":"1b7cc305cebe25f75062f91bd40847dcc4ff2f8d"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"cfffec713bb2f8054f4d259575e4036eb31ef642","unresolved":false,"context_lines":[{"line_number":519,"context_line":"            \"deleted IN (:deleted_1, :deleted_2)\","},{"line_number":520,"context_line":"            \"deleted IN (:param_1, :param_2)\""},{"line_number":521,"context_line":"        )"},{"line_number":522,"context_line":"        return any(sqltext.endswith(marker) for marker in constraint_markers)"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    constraints \u003d []"},{"line_number":525,"context_line":"    for constraint in table.constraints:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9Hxo%3D","line":522,"in_reply_to":"AAAATn%2F9IK4%3D","updated":"2014-01-17 09:45:53.000000000","message":"Personally I do not like this idea because now all the existing variations is contained in the single place, this simplifies the problem understanding. All other logic is pretty simple and short.","commit_id":"1b7cc305cebe25f75062f91bd40847dcc4ff2f8d"}]}
