)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"26ca79180074702141295016dd33bcbe5f650f52","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Database class in order to fill test database from model description"},{"line_number":17,"context_line":"only."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Partial-Bug: #1347604"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I039d955f051eda015bef2299122fd1f0fb5c46da"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"baada198_ce9123f9","line":19,"updated":"2014-07-29 20:48:42.000000000","message":"What else is needed to fix that bug?","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"da83a8cb13e4443646156d83e86ac24db8ce23c4","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Database class in order to fill test database from model description"},{"line_number":17,"context_line":"only."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Partial-Bug: #1347604"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I039d955f051eda015bef2299122fd1f0fb5c46da"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"baada198_14b4be80","line":19,"in_reply_to":"baada198_ad73ce4c","updated":"2014-07-31 14:12:08.000000000","message":"good, glad you\u0027re going to take care of that :-)","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"b7b229f187b7ea91b321c0378e8be322018b2220","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Database class in order to fill test database from model description"},{"line_number":17,"context_line":"only."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Partial-Bug: #1347604"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I039d955f051eda015bef2299122fd1f0fb5c46da"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"baada198_ad73ce4c","line":19,"in_reply_to":"baada198_ce9123f9","updated":"2014-07-31 12:25:55.000000000","message":"at least, fix the documentation - for example, see http://docs.openstack.org/developer/ironic/dev/dev-quickstart.html#exercising-the-services-locally","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"a148266ebdb89579f18808226afd4bcee86ce784","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Victor Sergeyev \u003cvsergeyev@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-08-07 13:42:37 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use metadata.create_all() to get database schema"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There is no need to run database migration each time, when we want to"},{"line_number":10,"context_line":"get a new actual database schema. Running all migration scripts takes a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa98f980_bf3cfc94","line":7,"updated":"2014-09-01 15:13:53.000000000","message":"s/get/initialise/","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"49f259f6d1897e392d6d93406452a99c5469fdf4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Victor Sergeyev \u003cvsergeyev@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-08-07 13:42:37 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use metadata.create_all() to get database schema"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There is no need to run database migration each time, when we want to"},{"line_number":10,"context_line":"get a new actual database schema. Running all migration scripts takes a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa98f980_5c783ec4","line":7,"in_reply_to":"fa98f980_bf3cfc94","updated":"2014-09-02 14:58:48.000000000","message":"Done","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"cbf86faa1271a38346c9c114944cf038e98c2ec2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Victor Sergeyev \u003cvsergeyev@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-08-07 13:42:37 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use metadata.create_all() to get database schema"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There is no need to run database migration each time, when we want to"},{"line_number":10,"context_line":"get a new actual database schema. Running all migration scripts takes a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa98f980_5bb04bf4","line":7,"in_reply_to":"fa98f980_bf3cfc94","updated":"2014-09-02 14:31:59.000000000","message":"will fix in the next patch set, if you don\u0027t mind","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"}],"ironic/cmd/dbsync.py":[{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"e4155453f6a36e44d3dec701717a9d2572b93d6f","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    parser \u003d subparsers.add_parser(\u0027version\u0027)"},{"line_number":75,"context_line":"    parser.set_defaults(func\u003dcommand_object.version)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    parser \u003d subparsers.add_parser(\u0027create_schema\u0027)"},{"line_number":78,"context_line":"    parser.set_defaults(func\u003dcommand_object.create_schema)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_2c45849a","line":77,"updated":"2014-07-28 16:06:13.000000000","message":"Can anybody suggest more suitable name for this command? :)","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"fc8ce91e16a9b5aebf80178c70a0d0cf4155cd01","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    parser \u003d subparsers.add_parser(\u0027version\u0027)"},{"line_number":75,"context_line":"    parser.set_defaults(func\u003dcommand_object.version)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    parser \u003d subparsers.add_parser(\u0027create_schema\u0027)"},{"line_number":78,"context_line":"    parser.set_defaults(func\u003dcommand_object.create_schema)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_a36fa85f","line":77,"in_reply_to":"baada198_0c2b6095","updated":"2014-07-29 20:47:32.000000000","message":"From the user\u0027s perspective, isn\u0027t this creating the db tables? I think that \u0027create\u0027 might be sufficient here. Then the user could do \u0027ironic-dbsync create\u0027.","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"069a29cebe7a3741193562d6aa5f4a11ef732a8e","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    parser \u003d subparsers.add_parser(\u0027version\u0027)"},{"line_number":75,"context_line":"    parser.set_defaults(func\u003dcommand_object.version)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    parser \u003d subparsers.add_parser(\u0027create_schema\u0027)"},{"line_number":78,"context_line":"    parser.set_defaults(func\u003dcommand_object.create_schema)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_07f419cd","line":77,"in_reply_to":"baada198_0c2b6095","updated":"2014-07-29 18:23:50.000000000","message":"the name create_schema seems fine to me","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6ed0d8f3af5490179d1577f8b8e724d13cd9269e","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    parser \u003d subparsers.add_parser(\u0027version\u0027)"},{"line_number":75,"context_line":"    parser.set_defaults(func\u003dcommand_object.version)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    parser \u003d subparsers.add_parser(\u0027create_schema\u0027)"},{"line_number":78,"context_line":"    parser.set_defaults(func\u003dcommand_object.create_schema)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_0c2b6095","line":77,"in_reply_to":"baada198_2c45849a","updated":"2014-07-28 16:12:34.000000000","message":"It\u0027s ok as it is, though word `create` is not perfect. Maybe `apply_schema`?","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"b7b229f187b7ea91b321c0378e8be322018b2220","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    parser \u003d subparsers.add_parser(\u0027version\u0027)"},{"line_number":75,"context_line":"    parser.set_defaults(func\u003dcommand_object.version)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    parser \u003d subparsers.add_parser(\u0027create_schema\u0027)"},{"line_number":78,"context_line":"    parser.set_defaults(func\u003dcommand_object.create_schema)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_adef4eb0","line":77,"in_reply_to":"baada198_a36fa85f","updated":"2014-07-31 12:25:55.000000000","message":"so do we have any decision here? It\u0027s really not a big deal for me, but I\u0027m not native speaker, and this will be available for users, so I just want to be sure, that this command will be correct an clear.","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"da83a8cb13e4443646156d83e86ac24db8ce23c4","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    parser \u003d subparsers.add_parser(\u0027version\u0027)"},{"line_number":75,"context_line":"    parser.set_defaults(func\u003dcommand_object.version)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    parser \u003d subparsers.add_parser(\u0027create_schema\u0027)"},{"line_number":78,"context_line":"    parser.set_defaults(func\u003dcommand_object.create_schema)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_f44aea80","line":77,"in_reply_to":"baada198_adef4eb0","updated":"2014-07-31 14:12:08.000000000","message":"It is hard to get a decision from \u0027everyone\u0027, but Dmitry said he\u0027s ok with \u0027create\u0027 too.","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"}],"ironic/tests/base.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7d0a2c0fe568a1fc44f1ab9a65724aa8d95c7f12","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if db_migrate.version():"},{"line_number":93,"context_line":"            return"},{"line_number":94,"context_line":"        models.Base.metadata.create_all(self.engine)"},{"line_number":95,"context_line":"        db_migrate.stamp(\u0027head\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def setUp(self):"},{"line_number":98,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_0cd60bc3","line":95,"updated":"2014-07-28 11:53:53.000000000","message":"Can\u0027t we use migration.create_schema() here?","commit_id":"a87328ed4678bcd087daa8aa8e1f4231c4b18c82"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"3b795e220222e54abd646922a68823cd654e6f9a","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if db_migrate.version():"},{"line_number":93,"context_line":"            return"},{"line_number":94,"context_line":"        models.Base.metadata.create_all(self.engine)"},{"line_number":95,"context_line":"        db_migrate.stamp(\u0027head\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def setUp(self):"},{"line_number":98,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_a12e00f8","line":95,"in_reply_to":"baada198_0cd60bc3","updated":"2014-07-28 14:35:21.000000000","message":"Well, sure we can do it.\n\nI see the following issues in this case - we get a new engine here and in migration.create_schema(), so there engines can be different. Should I change create_schema() signature due to pass engine there?","commit_id":"a87328ed4678bcd087daa8aa8e1f4231c4b18c82"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"9403cc42286d176860870da75602adea4db278ec","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if db_migrate.version():"},{"line_number":93,"context_line":"            return"},{"line_number":94,"context_line":"        models.Base.metadata.create_all(self.engine)"},{"line_number":95,"context_line":"        db_migrate.stamp(\u0027head\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def setUp(self):"},{"line_number":98,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_e16c7809","line":95,"in_reply_to":"baada198_a12e00f8","updated":"2014-07-28 14:40:41.000000000","message":"I would say yes.","commit_id":"a87328ed4678bcd087daa8aa8e1f4231c4b18c82"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"3fc599eea6c2dd6ad88e1f651d7ef2eeb5efa0cb","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if db_migrate.version():"},{"line_number":93,"context_line":"            return"},{"line_number":94,"context_line":"        models.Base.metadata.create_all(self.engine)"},{"line_number":95,"context_line":"        db_migrate.stamp(\u0027head\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def setUp(self):"},{"line_number":98,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_e9c45e42","line":95,"in_reply_to":"baada198_e16c7809","updated":"2014-07-28 16:04:10.000000000","message":"Fixed after IRC conversation","commit_id":"a87328ed4678bcd087daa8aa8e1f4231c4b18c82"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"f4d6c2c45ae260b76e4712346af1d946bbec96dd","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def setup_database(self, db_migrate):"},{"line_number":89,"context_line":"        if db_migrate.version(engine\u003dself.engine):"},{"line_number":90,"context_line":"            return"},{"line_number":91,"context_line":"        db_migrate.create_schema(engine\u003dself.engine)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def setUp(self):"},{"line_number":94,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_32f3ab6e","line":91,"updated":"2014-08-07 11:12:00.000000000","message":"I\u0027m a bit worried by this moment. If we run it on non-sqlite db, on which we already created schema, what will happen? previously it was db_migrate.upgrade(\u0027head\u0027) and worked. I suggest we still keep separate paths for sqlite (using create_all) and mysql/pgsql (using upgrade).","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"a148266ebdb89579f18808226afd4bcee86ce784","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def setup_database(self, db_migrate):"},{"line_number":89,"context_line":"        if db_migrate.version(engine\u003dself.engine):"},{"line_number":90,"context_line":"            return"},{"line_number":91,"context_line":"        db_migrate.create_schema(engine\u003dself.engine)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def setUp(self):"},{"line_number":94,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_ffcf64ae","line":91,"in_reply_to":"1abeadc6_414a6184","updated":"2014-09-01 15:13:53.000000000","message":"I think the problem that is described by Dmitry happens when there is a db which contains the schema of the old version. Now dbsync updates it to the latest version. This approach will leave it untouched.\n\nHowever, the old dbsync behaviour will remain untouched, making it possible to upgrade existing schemas, so I don\u0027t think that it\u0027s a problem at all. Please correct me, if I\u0027m wrong.","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e30d8313f7f173b14ef15f78d5ee88b2ad323c13","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def setup_database(self, db_migrate):"},{"line_number":89,"context_line":"        if db_migrate.version(engine\u003dself.engine):"},{"line_number":90,"context_line":"            return"},{"line_number":91,"context_line":"        db_migrate.create_schema(engine\u003dself.engine)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def setUp(self):"},{"line_number":94,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_5c82f1ff","line":91,"in_reply_to":"baada198_32f3ab6e","updated":"2014-08-07 13:42:58.000000000","message":"Dmitry, 1) for this test ficture we do nothing in this case (line 90), 2) if user run \u0027create_schema\u0027 command from migrate script, DbMigrationError raises in this case (migration.py line 71) and script do nothing, covered by test_upgrade_and_create_schema.","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"68a59ff33c06a53c8426871191ddf6b03ad35ec0","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def setup_database(self, db_migrate):"},{"line_number":89,"context_line":"        if db_migrate.version(engine\u003dself.engine):"},{"line_number":90,"context_line":"            return"},{"line_number":91,"context_line":"        db_migrate.create_schema(engine\u003dself.engine)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def setUp(self):"},{"line_number":94,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_7f3b2739","line":91,"in_reply_to":"baada198_5c82f1ff","updated":"2014-08-07 14:08:20.000000000","message":"My worry  is also about incomplete schema in case of e.g. MySQL. We used to auto-upgrade schema before, now it will remain the same (probably already wrong). I am not sure I agree with this behaviour change.","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"9d8715847631e3d1167bbd3e741c889b9e01bd8e","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def setup_database(self, db_migrate):"},{"line_number":89,"context_line":"        if db_migrate.version(engine\u003dself.engine):"},{"line_number":90,"context_line":"            return"},{"line_number":91,"context_line":"        db_migrate.create_schema(engine\u003dself.engine)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def setUp(self):"},{"line_number":94,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_414a6184","line":91,"in_reply_to":"baada198_7f3b2739","updated":"2014-08-18 07:22:40.000000000","message":"Hi Dmitry!\n\nCould you please extend your suggestion a bit?","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"49f259f6d1897e392d6d93406452a99c5469fdf4","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def setup_database(self, db_migrate):"},{"line_number":89,"context_line":"        if db_migrate.version(engine\u003dself.engine):"},{"line_number":90,"context_line":"            return"},{"line_number":91,"context_line":"        db_migrate.create_schema(engine\u003dself.engine)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def setUp(self):"},{"line_number":94,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_fc4e5295","line":91,"in_reply_to":"fa98f980_a1dca113","updated":"2014-09-02 14:58:48.000000000","message":"fixed, as suggested in 2)","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"cbf86faa1271a38346c9c114944cf038e98c2ec2","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def setup_database(self, db_migrate):"},{"line_number":89,"context_line":"        if db_migrate.version(engine\u003dself.engine):"},{"line_number":90,"context_line":"            return"},{"line_number":91,"context_line":"        db_migrate.create_schema(engine\u003dself.engine)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def setUp(self):"},{"line_number":94,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_a1dca113","line":91,"in_reply_to":"fa98f980_e9069dcd","updated":"2014-09-02 14:31:59.000000000","message":"Roman, Lukas - \n\nyes, that is the issue, which was described by Dmitry - he supposed, that tests can bu run on DB which contains the schema of the old version. But, honestly, I have a doubt, that somebody use another backend, but SQLite for this tests.\n\nThis change applies for all supported backends SQLite logic - we just check, if DB is under version control. If yes - we suppose, that DB contains the latest schema. \n\nAnyway, it\u0027s not a big deal for me - to keep the same behavior as was before - to update non-SQLite backends to the latest version here. Please, let someone confirm.\n\nThanks!","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"45d28442857eec427a59c5ff04bb7e59ffa249fd","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    def setup_database(self, db_migrate):"},{"line_number":89,"context_line":"        if db_migrate.version(engine\u003dself.engine):"},{"line_number":90,"context_line":"            return"},{"line_number":91,"context_line":"        db_migrate.create_schema(engine\u003dself.engine)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def setUp(self):"},{"line_number":94,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_e9069dcd","line":91,"in_reply_to":"fa98f980_ffcf64ae","updated":"2014-09-02 09:44:30.000000000","message":"Ok so the concern is that if the DB around has an old schema and you call this method the behavior before was to update the DB to the last version (head) and now it\u0027s going to fail. Is that correct?\n\nSo I looked at create_schema at the migration.py and it seems that if you call this method for a db that already has a schema it will fail with:\n\n DbMigrationError(\"DB schema is already under version control. Use upgrade() instead\")\n\n\nThe message is self explanatory enough, I see two ways of doing it:\n\n1- Simply leave it as-is, and the user will see the message and issue update() to sync the changes\n\n2- Handle the DbMigrationError here (maybe create a more specific error for that, e.g DbAlreadyContainsASchemaError) and issue update(\u0027head\u0027) for this case\n\nNow, IMHO, I think 2) would be ideal because we keep the same behavior as before, and people who have a script around the dbsync tool won\u0027t have to change it. Also, I believe that this old behavior of the dbsync tool might be present on the dbsync tool from other projects (because ours is mostly a copy cat from others AFAICT).","commit_id":"b297227774571ab12cf449f03ea0f06d8480ed66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"45dc547a223441486185b9f8f342330d5f5e117d","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            #                can do nothing with it, because Alembic doesn\u0027t"},{"line_number":95,"context_line":"            #                support migrations for SQLite"},{"line_number":96,"context_line":"            if self.engine.name !\u003d \"sqlite\":"},{"line_number":97,"context_line":"                db_migrate.upgrade(\u0027head\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def setUp(self):"},{"line_number":100,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_d9ec19f6","line":97,"updated":"2014-09-03 10:31:28.000000000","message":"+ should be:\n\n else:\n   raise\n\nso that we don\u0027t lose error","commit_id":"13ff7b7191cb3a0c076996c21e388f00e61746c0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"40436f9db7c80e3cb9c78ba20a56631c78c07a6c","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            #                can do nothing with it, because Alembic doesn\u0027t"},{"line_number":95,"context_line":"            #                support migrations for SQLite"},{"line_number":96,"context_line":"            if self.engine.name !\u003d \"sqlite\":"},{"line_number":97,"context_line":"                db_migrate.upgrade(\u0027head\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def setUp(self):"},{"line_number":100,"context_line":"        super(Database, self).setUp()"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_97e6ffb2","line":97,"updated":"2014-09-02 15:21:08.000000000","message":"if it happens to you to have to submit another patch-set for it, it would be good to add a test to this case","commit_id":"13ff7b7191cb3a0c076996c21e388f00e61746c0"}],"ironic/tests/test_dbsync.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"fc8ce91e16a9b5aebf80178c70a0d0cf4155cd01","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        v \u003d migration.version()"},{"line_number":29,"context_line":"        self.assertTrue(v)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_create_shema(self):"},{"line_number":32,"context_line":"        migration.create_schema()"},{"line_number":33,"context_line":"        v \u003d migration.version()"},{"line_number":34,"context_line":"        self.assertTrue(v)"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_4e3b5339","line":31,"updated":"2014-07-29 20:47:32.000000000","message":"typo: test_create_shema -\u003e test_create_schema","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"b7b229f187b7ea91b321c0378e8be322018b2220","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        v \u003d migration.version()"},{"line_number":29,"context_line":"        self.assertTrue(v)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_create_shema(self):"},{"line_number":32,"context_line":"        migration.create_schema()"},{"line_number":33,"context_line":"        v \u003d migration.version()"},{"line_number":34,"context_line":"        self.assertTrue(v)"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_8d1e0abb","line":31,"in_reply_to":"baada198_4e3b5339","updated":"2014-07-31 12:25:55.000000000","message":"yep, will fix in the next patch set","commit_id":"75823f2babfec53bbd3270bf97eaf576359bcffc"}]}
