)]}'
{"specs/keystone/ussuri/alembic-migrations.rst":[{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"041abfda4c15efac6399e2026e4109b7662ec768","unresolved":false,"context_lines":[{"line_number":27,"context_line":"with all of the latter following all of the former. This places unnecessary"},{"line_number":28,"context_line":"restrictions on the order of migrations and becomes very error prone as multiple"},{"line_number":29,"context_line":"schema changes are introduced in a single cycle."},{"line_number":30,"context_line":"Essentially, using SQLAlchemy-migrate constraints ``expand`` and ``contract``"},{"line_number":31,"context_line":"migrations to be run atomically and does not easily facilitate separating them into"},{"line_number":32,"context_line":"phases as required during rolling upgrades."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":".. _rolling upgrades: https://docs.openstack.org/keystone/latest/contributor/database-migrations.html"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_7ed40a4c","line":32,"range":{"start_line":30,"start_character":0,"end_line":32,"end_character":43},"updated":"2019-12-17 20:05:34.000000000","message":"Please elaborate more on this point. I\u0027m not sure how Alembic removes this constraint. Glance uses Alembic [0] and has a system that is very similar to ours, with the same constraints and limitations. \n\n0. https://docs.openstack.org/glance/latest/contributor/database_migrations.html","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"99e8a005611be115337d8b9532cf82cdeeee3000","unresolved":false,"context_lines":[{"line_number":27,"context_line":"with all of the latter following all of the former. This places unnecessary"},{"line_number":28,"context_line":"restrictions on the order of migrations and becomes very error prone as multiple"},{"line_number":29,"context_line":"schema changes are introduced in a single cycle."},{"line_number":30,"context_line":"Essentially, using SQLAlchemy-migrate constraints ``expand`` and ``contract``"},{"line_number":31,"context_line":"migrations to be run atomically and does not easily facilitate separating them into"},{"line_number":32,"context_line":"phases as required during rolling upgrades."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":".. _rolling upgrades: https://docs.openstack.org/keystone/latest/contributor/database-migrations.html"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_7361ca10","line":32,"range":{"start_line":30,"start_character":0,"end_line":32,"end_character":43},"in_reply_to":"3fa7e38b_7ed40a4c","updated":"2020-01-13 05:45:48.000000000","message":"Done","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"041abfda4c15efac6399e2026e4109b7662ec768","unresolved":false,"context_lines":[{"line_number":37,"context_line":"We are proposing to port the migration flows to be handled by `Alembic`_. There"},{"line_number":38,"context_line":"are numerous benefits to this change."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"* Alembic itself manages the sequence of migration scripts by the providing the"},{"line_number":41,"context_line":"  uuids when a new migration script is created. Further explained in `Proposed change`_."},{"line_number":42,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of"},{"line_number":43,"context_line":"  placeholders created for backporting."},{"line_number":44,"context_line":"* Alembic maintains a alembic_version table to store the current version of"},{"line_number":45,"context_line":"  the migration, so as to calculate and run upgrade till database version"},{"line_number":46,"context_line":"  requested."}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_fe4c7a76","line":43,"range":{"start_line":40,"start_character":2,"end_line":43,"end_character":39},"updated":"2019-12-17 20:05:34.000000000","message":"These are the same point. Because uuids are not sequential, backporting doesn\u0027t require placeholders.","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":37,"context_line":"We are proposing to port the migration flows to be handled by `Alembic`_. There"},{"line_number":38,"context_line":"are numerous benefits to this change."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"* Alembic itself manages the sequence of migration scripts by the providing the"},{"line_number":41,"context_line":"  uuids when a new migration script is created. Further explained in `Proposed change`_."},{"line_number":42,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of"},{"line_number":43,"context_line":"  placeholders created for backporting."},{"line_number":44,"context_line":"* Alembic maintains a alembic_version table to store the current version of"},{"line_number":45,"context_line":"  the migration, so as to calculate and run upgrade till database version"},{"line_number":46,"context_line":"  requested."}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_44c08efa","line":43,"range":{"start_line":40,"start_character":2,"end_line":43,"end_character":39},"in_reply_to":"3fa7e38b_fe4c7a76","updated":"2020-01-11 13:58:06.000000000","message":"AFAIK the purpose of adding placeholders is in case any schema change is backported?","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"041abfda4c15efac6399e2026e4109b7662ec768","unresolved":false,"context_lines":[{"line_number":41,"context_line":"  uuids when a new migration script is created. Further explained in `Proposed change`_."},{"line_number":42,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of"},{"line_number":43,"context_line":"  placeholders created for backporting."},{"line_number":44,"context_line":"* Alembic maintains a alembic_version table to store the current version of"},{"line_number":45,"context_line":"  the migration, so as to calculate and run upgrade till database version"},{"line_number":46,"context_line":"  requested."},{"line_number":47,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s"},{"line_number":48,"context_line":"  ORM. It figures out the changes by comparing the database schema and the model\u0027s"},{"line_number":49,"context_line":"  metadata that can be found in env.py python file."}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_9e51c610","line":46,"range":{"start_line":44,"start_character":0,"end_line":46,"end_character":12},"updated":"2019-12-17 20:05:34.000000000","message":"Not an advantage over what we already have. See my comment in previous patchset.","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":41,"context_line":"  uuids when a new migration script is created. Further explained in `Proposed change`_."},{"line_number":42,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of"},{"line_number":43,"context_line":"  placeholders created for backporting."},{"line_number":44,"context_line":"* Alembic maintains a alembic_version table to store the current version of"},{"line_number":45,"context_line":"  the migration, so as to calculate and run upgrade till database version"},{"line_number":46,"context_line":"  requested."},{"line_number":47,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s"},{"line_number":48,"context_line":"  ORM. It figures out the changes by comparing the database schema and the model\u0027s"},{"line_number":49,"context_line":"  metadata that can be found in env.py python file."}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_440dee90","line":46,"range":{"start_line":44,"start_character":0,"end_line":46,"end_character":12},"in_reply_to":"3fa7e38b_9e51c610","updated":"2020-01-11 13:58:06.000000000","message":"Done","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6ba059072b42e9cd804bdc0df620b928e05b4d0b","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":".. _Alembic: https://alembic.sqlalchemy.org/en/latest/"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Proposed change"},{"line_number":57,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_f17f8466","line":55,"updated":"2019-12-23 18:51:16.000000000","message":"I think the main benefit of using Alembic over sqlalchemy-migrate is to stop depending on a forked project and start using a modern and still maintained project. This is mentioned in the old spec but not here.","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":".. _Alembic: https://alembic.sqlalchemy.org/en/latest/"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Proposed change"},{"line_number":57,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_240c7292","line":55,"in_reply_to":"3fa7e38b_f17f8466","updated":"2020-01-11 13:58:06.000000000","message":"Done","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6ba059072b42e9cd804bdc0df620b928e05b4d0b","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Proposed change"},{"line_number":57,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"To configure alembic migration tool in keystone we need to install and execute"},{"line_number":60,"context_line":"the following command \"alembic init alembic\". This will create Alembic directory"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_916ad07f","line":57,"updated":"2019-12-23 18:51:16.000000000","message":"Please add how this will work with the current sqlalchemy-based migration scripts and tooling.","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Proposed change"},{"line_number":57,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"To configure alembic migration tool in keystone we need to install and execute"},{"line_number":60,"context_line":"the following command \"alembic init alembic\". This will create Alembic directory"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_c420fefc","line":57,"in_reply_to":"3fa7e38b_916ad07f","updated":"2020-01-11 13:58:06.000000000","message":"Done","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6ba059072b42e9cd804bdc0df620b928e05b4d0b","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"To configure alembic migration tool in keystone we need to install and execute"},{"line_number":60,"context_line":"the following command \"alembic init alembic\". This will create Alembic directory"},{"line_number":61,"context_line":"inside your project."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"The structure will be::"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_11834057","line":61,"range":{"start_line":61,"start_character":7,"end_line":61,"end_character":19},"updated":"2019-12-23 18:51:16.000000000","message":"keystone","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"To configure alembic migration tool in keystone we need to install and execute"},{"line_number":60,"context_line":"the following command \"alembic init alembic\". This will create Alembic directory"},{"line_number":61,"context_line":"inside your project."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"The structure will be::"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_0407f672","line":61,"range":{"start_line":61,"start_character":7,"end_line":61,"end_character":19},"in_reply_to":"3fa7e38b_11834057","updated":"2020-01-11 13:58:06.000000000","message":"Done","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6ba059072b42e9cd804bdc0df620b928e05b4d0b","unresolved":false,"context_lines":[{"line_number":63,"context_line":"The structure will be::"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    keystone/"},{"line_number":66,"context_line":"    |---- alembic/"},{"line_number":67,"context_line":"          |---- env.py"},{"line_number":68,"context_line":"          |---- README"},{"line_number":69,"context_line":"          |---- script.py.mako"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_b1790c83","line":66,"updated":"2019-12-23 18:51:16.000000000","message":"The current sql-migrate structure is in keystone/common/sql - wouldn\u0027t it be better to keep that structure? Or at least keep it under common/ rather than directly under keystone/ ?","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":63,"context_line":"The structure will be::"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    keystone/"},{"line_number":66,"context_line":"    |---- alembic/"},{"line_number":67,"context_line":"          |---- env.py"},{"line_number":68,"context_line":"          |---- README"},{"line_number":69,"context_line":"          |---- script.py.mako"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_64126ab6","line":66,"in_reply_to":"3fa7e38b_b1790c83","updated":"2020-01-11 13:58:06.000000000","message":"Done","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6ba059072b42e9cd804bdc0df620b928e05b4d0b","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"The new command utility to create a new Revision ::"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    keystone-manage revision -m \"create new Revision\""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"The generated Revision will look like :"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_918e5078","line":93,"updated":"2019-12-23 18:51:16.000000000","message":"I don\u0027t think this should be added to the keystone-manage command. keystone-manage is for operators, not developers. Developers can use a tox environment.","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"The new command utility to create a new Revision ::"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    keystone-manage revision -m \"create new Revision\""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"The generated Revision will look like :"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_841a06c5","line":93,"in_reply_to":"3fa7e38b_918e5078","updated":"2020-01-11 13:58:06.000000000","message":"Should this be tox revision -m \"Create new revision\"\"?","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6ba059072b42e9cd804bdc0df620b928e05b4d0b","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    def upgrade():"},{"line_number":116,"context_line":"        pass"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def downgrade():"},{"line_number":119,"context_line":"        pass"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"The newly created revision will have upgrade() and downgrade() functions in"},{"line_number":122,"context_line":"which the code for database schema changes is to be added using the pre-defined"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_318d1c7c","line":119,"range":{"start_line":118,"start_character":4,"end_line":119,"end_character":12},"updated":"2019-12-23 18:51:16.000000000","message":"We don\u0027t currently support downgrade. I doubt that alembic makes it easier to support downgrade.","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    def upgrade():"},{"line_number":116,"context_line":"        pass"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def downgrade():"},{"line_number":119,"context_line":"        pass"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"The newly created revision will have upgrade() and downgrade() functions in"},{"line_number":122,"context_line":"which the code for database schema changes is to be added using the pre-defined"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_a417029e","line":119,"range":{"start_line":118,"start_character":4,"end_line":119,"end_character":12},"in_reply_to":"3fa7e38b_318d1c7c","updated":"2020-01-11 13:58:06.000000000","message":"Done","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6ba059072b42e9cd804bdc0df620b928e05b4d0b","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"To upgrade the database with the latest Revision the command utility will be ::"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    keystone-manage upgrade head"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"Several other command utilities will be added to keystone-manage like these:"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_d1f12802","line":132,"updated":"2019-12-23 18:51:16.000000000","message":"If this is an operator-facing interface, we should keep it the same as the existing db_sync interface. This should all be an internal refactor, invisible to users. Operators should not have to change their tooling to keep doing schema upgrades.","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"To upgrade the database with the latest Revision the command utility will be ::"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    keystone-manage upgrade head"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"Several other command utilities will be added to keystone-manage like these:"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_4472ce1a","line":132,"in_reply_to":"3fa7e38b_d1f12802","updated":"2020-01-11 13:58:06.000000000","message":"Done","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6ba059072b42e9cd804bdc0df620b928e05b4d0b","unresolved":false,"context_lines":[{"line_number":158,"context_line":"Note: Auto-generation is still getting improved with every release of Alembic. It"},{"line_number":159,"context_line":"still has some drawbacks and is always required to review the generated script"},{"line_number":160,"context_line":"manually. It can detect changes like tables additions, removals and changes related"},{"line_number":161,"context_line":"to foreign key contraints. There are `several cases`_ in which it isn’t able to detect"},{"line_number":162,"context_line":"the changes correctly like changing table name, it may drop the old table and create"},{"line_number":163,"context_line":"a new with new name causing loss of data."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":".. _several cases: https://alembic.sqlalchemy.org/en/latest/autogenerate.html#what-does-autogenerate-detect-and-what-does-it-not-detect"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_b1558cc4","line":163,"range":{"start_line":161,"start_character":27,"end_line":163,"end_character":41},"updated":"2019-12-23 18:51:16.000000000","message":"I suggest just not using this, or not mentioning it in the spec. It\u0027s not important for the overall goal of the spec.","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":158,"context_line":"Note: Auto-generation is still getting improved with every release of Alembic. It"},{"line_number":159,"context_line":"still has some drawbacks and is always required to review the generated script"},{"line_number":160,"context_line":"manually. It can detect changes like tables additions, removals and changes related"},{"line_number":161,"context_line":"to foreign key contraints. There are `several cases`_ in which it isn’t able to detect"},{"line_number":162,"context_line":"the changes correctly like changing table name, it may drop the old table and create"},{"line_number":163,"context_line":"a new with new name causing loss of data."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":".. _several cases: https://alembic.sqlalchemy.org/en/latest/autogenerate.html#what-does-autogenerate-detect-and-what-does-it-not-detect"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_6477ca09","line":163,"range":{"start_line":161,"start_character":27,"end_line":163,"end_character":41},"in_reply_to":"3fa7e38b_b1558cc4","updated":"2020-01-11 13:58:06.000000000","message":"Done","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6ba059072b42e9cd804bdc0df620b928e05b4d0b","unresolved":false,"context_lines":[{"line_number":222,"context_line":"Implementation"},{"line_number":223,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"A new ``alembic_migrations`` folder is added under ``keystone/common/sql``"},{"line_number":226,"context_line":"This folder will contain all the necessary code to implement"},{"line_number":227,"context_line":"Alembic based migrations, including:"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_716f1493","line":225,"updated":"2019-12-23 18:51:16.000000000","message":"This is inconsistent with the directory structure made in the proposal section.","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"19c6489c23d1e639fdfea9be3124ead6db1f176e","unresolved":false,"context_lines":[{"line_number":222,"context_line":"Implementation"},{"line_number":223,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"A new ``alembic_migrations`` folder is added under ``keystone/common/sql``"},{"line_number":226,"context_line":"This folder will contain all the necessary code to implement"},{"line_number":227,"context_line":"Alembic based migrations, including:"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fa7e38b_2481d2c3","line":225,"in_reply_to":"3fa7e38b_716f1493","updated":"2020-01-11 13:58:06.000000000","message":"Done","commit_id":"46aaf88ed1478bca0802f7f56f5600a678f6c185"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":18,"context_line":"Problem description"},{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Database migrations are implemented in Keystone using SQLAlchemy- migrate"},{"line_number":22,"context_line":"scripts. The frequent schema changes, such as adding or deleting columns or"},{"line_number":23,"context_line":"writing your own migration scripts could be challenging to tackle and also"},{"line_number":24,"context_line":"hard to maintain. This approach makes designing migrations for `rolling upgrades`_"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_af8256fe","line":21,"range":{"start_line":21,"start_character":65,"end_line":21,"end_character":66},"updated":"2020-01-14 20:27:27.000000000","message":"nit extra space here","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":18,"context_line":"Problem description"},{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Database migrations are implemented in Keystone using SQLAlchemy- migrate"},{"line_number":22,"context_line":"scripts. The frequent schema changes, such as adding or deleting columns or"},{"line_number":23,"context_line":"writing your own migration scripts could be challenging to tackle and also"},{"line_number":24,"context_line":"hard to maintain. This approach makes designing migrations for `rolling upgrades`_"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_73b978e9","line":21,"range":{"start_line":21,"start_character":65,"end_line":21,"end_character":66},"in_reply_to":"3fa7e38b_af8256fe","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Database migrations are implemented in Keystone using SQLAlchemy- migrate"},{"line_number":22,"context_line":"scripts. The frequent schema changes, such as adding or deleting columns or"},{"line_number":23,"context_line":"writing your own migration scripts could be challenging to tackle and also"},{"line_number":24,"context_line":"hard to maintain. This approach makes designing migrations for `rolling upgrades`_"},{"line_number":25,"context_line":"extremely uncomfortable while dealing in large distributed systems. The ``expand``"},{"line_number":26,"context_line":"and ``contract`` migrations would have to be created in strict sequential order"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_4f8e4234","line":23,"range":{"start_line":23,"start_character":35,"end_line":23,"end_character":43},"updated":"2020-01-14 20:27:27.000000000","message":"s/could be/are\n\nBecause they\u0027re really not the easiest thing to do imo.","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Database migrations are implemented in Keystone using SQLAlchemy- migrate"},{"line_number":22,"context_line":"scripts. The frequent schema changes, such as adding or deleting columns or"},{"line_number":23,"context_line":"writing your own migration scripts could be challenging to tackle and also"},{"line_number":24,"context_line":"hard to maintain. This approach makes designing migrations for `rolling upgrades`_"},{"line_number":25,"context_line":"extremely uncomfortable while dealing in large distributed systems. The ``expand``"},{"line_number":26,"context_line":"and ``contract`` migrations would have to be created in strict sequential order"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_13b044fd","line":23,"range":{"start_line":23,"start_character":35,"end_line":23,"end_character":43},"in_reply_to":"3fa7e38b_4f8e4234","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"It\u0027s important for an application to always be updated with new maintained databases"},{"line_number":37,"context_line":"rather relying on one for long time. Alembic migrations have superseded"},{"line_number":38,"context_line":"Sqlalchemy-migrate for many years. It\u0027s a well maintained and provides ease to create"},{"line_number":39,"context_line":"migrations. Keystone will now use `Alembic`_ to run database migrations."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Alembic is a very convenient tool for performing migrations with SQLAlchemy."}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_2f6e6664","line":38,"range":{"start_line":38,"start_character":0,"end_line":38,"end_character":10},"updated":"2020-01-14 20:27:27.000000000","message":"SQLAlchemy","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"It\u0027s important for an application to always be updated with new maintained databases"},{"line_number":37,"context_line":"rather relying on one for long time. Alembic migrations have superseded"},{"line_number":38,"context_line":"Sqlalchemy-migrate for many years. It\u0027s a well maintained and provides ease to create"},{"line_number":39,"context_line":"migrations. Keystone will now use `Alembic`_ to run database migrations."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Alembic is a very convenient tool for performing migrations with SQLAlchemy."}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_8fabda6f","line":38,"range":{"start_line":38,"start_character":40,"end_line":38,"end_character":41},"updated":"2020-01-14 20:27:27.000000000","message":"nit: s/a/currently","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"It\u0027s important for an application to always be updated with new maintained databases"},{"line_number":37,"context_line":"rather relying on one for long time. Alembic migrations have superseded"},{"line_number":38,"context_line":"Sqlalchemy-migrate for many years. It\u0027s a well maintained and provides ease to create"},{"line_number":39,"context_line":"migrations. Keystone will now use `Alembic`_ to run database migrations."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Alembic is a very convenient tool for performing migrations with SQLAlchemy."}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_33b3000c","line":38,"range":{"start_line":38,"start_character":40,"end_line":38,"end_character":41},"in_reply_to":"3fa7e38b_8fabda6f","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  information of the revision_id of script created prior in options like"},{"line_number":47,"context_line":"  \"down_revision\" and \"revision\" inside the script when a new migration script"},{"line_number":48,"context_line":"  is created. Further explained in `Proposed change`_."},{"line_number":49,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of"},{"line_number":50,"context_line":"  placeholders created for backporting."},{"line_number":51,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s"},{"line_number":52,"context_line":"  ORM. It figures out the changes by comparing the database schema and the model\u0027s"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_6fc77e3f","line":49,"range":{"start_line":49,"start_character":2,"end_line":49,"end_character":31},"updated":"2020-01-14 20:27:27.000000000","message":"This will only be backporting to stein correct? or previous?","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  information of the revision_id of script created prior in options like"},{"line_number":47,"context_line":"  \"down_revision\" and \"revision\" inside the script when a new migration script"},{"line_number":48,"context_line":"  is created. Further explained in `Proposed change`_."},{"line_number":49,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of"},{"line_number":50,"context_line":"  placeholders created for backporting."},{"line_number":51,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s"},{"line_number":52,"context_line":"  ORM. It figures out the changes by comparing the database schema and the model\u0027s"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_738c182d","line":49,"range":{"start_line":49,"start_character":2,"end_line":49,"end_character":31},"in_reply_to":"3fa7e38b_6fc77e3f","updated":"2020-01-17 07:28:44.000000000","message":"This is one of the general feature of Alembic which I mentioned. After moving to Alembic I don\u0027t think we will be able to backport to previous releases including stein since the new migration scripts wont be acceptable by SQLAlchemy.","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":60,"context_line":"Proposed change"},{"line_number":61,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"All the sqlalchemy-migrate migration scripts upto stein cycle will be consolidated"},{"line_number":64,"context_line":"into one migration named as \u0027stein_initial\u0027 which will use the new Alembic migrations."},{"line_number":65,"context_line":"The \u0027stein_initial\u0027 will be the first script in the Alembic migration scripts sequence."},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_2f95063e","line":63,"range":{"start_line":63,"start_character":45,"end_line":63,"end_character":49},"updated":"2020-01-14 20:27:27.000000000","message":"nit \"up to\"","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":60,"context_line":"Proposed change"},{"line_number":61,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"All the sqlalchemy-migrate migration scripts upto stein cycle will be consolidated"},{"line_number":64,"context_line":"into one migration named as \u0027stein_initial\u0027 which will use the new Alembic migrations."},{"line_number":65,"context_line":"The \u0027stein_initial\u0027 will be the first script in the Alembic migration scripts sequence."},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_3396a03f","line":63,"range":{"start_line":63,"start_character":45,"end_line":63,"end_character":49},"in_reply_to":"3fa7e38b_2f95063e","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":89,"context_line":"  scripts."},{"line_number":90,"context_line":"* The versions directory will contains all the migration scripts created. The"},{"line_number":91,"context_line":"  scripts in Alembic can be termed as Revisions. These Revisions will be given"},{"line_number":92,"context_line":"  uuids to ensure uniqueness along with string that describes about the database"},{"line_number":93,"context_line":"  schema change given in the Alembic command utility when creating new Revisions."},{"line_number":94,"context_line":"* Alembic will also create a configurable `alembic.ini`_ file which is looked by"},{"line_number":95,"context_line":"  scripts on invocation."}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_0fedaab7","line":92,"range":{"start_line":92,"start_character":40,"end_line":92,"end_character":46},"updated":"2020-01-14 20:27:27.000000000","message":"\"a string\"","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":89,"context_line":"  scripts."},{"line_number":90,"context_line":"* The versions directory will contains all the migration scripts created. The"},{"line_number":91,"context_line":"  scripts in Alembic can be termed as Revisions. These Revisions will be given"},{"line_number":92,"context_line":"  uuids to ensure uniqueness along with string that describes about the database"},{"line_number":93,"context_line":"  schema change given in the Alembic command utility when creating new Revisions."},{"line_number":94,"context_line":"* Alembic will also create a configurable `alembic.ini`_ file which is looked by"},{"line_number":95,"context_line":"  scripts on invocation."}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_8f2e7af7","line":92,"range":{"start_line":92,"start_character":62,"end_line":92,"end_character":67},"updated":"2020-01-14 20:27:27.000000000","message":"remove \"about\"","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":89,"context_line":"  scripts."},{"line_number":90,"context_line":"* The versions directory will contains all the migration scripts created. The"},{"line_number":91,"context_line":"  scripts in Alembic can be termed as Revisions. These Revisions will be given"},{"line_number":92,"context_line":"  uuids to ensure uniqueness along with string that describes about the database"},{"line_number":93,"context_line":"  schema change given in the Alembic command utility when creating new Revisions."},{"line_number":94,"context_line":"* Alembic will also create a configurable `alembic.ini`_ file which is looked by"},{"line_number":95,"context_line":"  scripts on invocation."}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_f397a836","line":92,"range":{"start_line":92,"start_character":40,"end_line":92,"end_character":46},"in_reply_to":"3fa7e38b_0fedaab7","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":89,"context_line":"  scripts."},{"line_number":90,"context_line":"* The versions directory will contains all the migration scripts created. The"},{"line_number":91,"context_line":"  scripts in Alembic can be termed as Revisions. These Revisions will be given"},{"line_number":92,"context_line":"  uuids to ensure uniqueness along with string that describes about the database"},{"line_number":93,"context_line":"  schema change given in the Alembic command utility when creating new Revisions."},{"line_number":94,"context_line":"* Alembic will also create a configurable `alembic.ini`_ file which is looked by"},{"line_number":95,"context_line":"  scripts on invocation."}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_93a674ac","line":92,"range":{"start_line":92,"start_character":62,"end_line":92,"end_character":67},"in_reply_to":"3fa7e38b_8f2e7af7","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    \"\"\"create a new revision"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    Revision ID: g33gk56lp8n3n"},{"line_number":110,"context_line":"    Revises:"},{"line_number":111,"context_line":"    Create Date: 2019-12-11 11:40:27.089406"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_cf0d5293","line":109,"range":{"start_line":109,"start_character":17,"end_line":109,"end_character":30},"updated":"2020-01-14 20:27:27.000000000","message":"this should be a uuid right? as described above?","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    \"\"\"create a new revision"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    Revision ID: g33gk56lp8n3n"},{"line_number":110,"context_line":"    Revises:"},{"line_number":111,"context_line":"    Create Date: 2019-12-11 11:40:27.089406"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_b3a13095","line":109,"range":{"start_line":109,"start_character":17,"end_line":109,"end_character":30},"in_reply_to":"3fa7e38b_cf0d5293","updated":"2020-01-17 07:28:44.000000000","message":"Yes this is the unique uuid.","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    \"\"\""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    # revision identifiers, used by Alembic."},{"line_number":116,"context_line":"    revision \u003d \u0027g33gk56lp8n3n\u0027"},{"line_number":117,"context_line":"    down_revision \u003d None"},{"line_number":118,"context_line":"    branch_labels \u003d None"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_ef128eb3","line":116,"range":{"start_line":116,"start_character":16,"end_line":116,"end_character":29},"updated":"2020-01-14 20:27:27.000000000","message":"ditto ^","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    def upgrade():"},{"line_number":124,"context_line":"        pass"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"The newly created revisions will have upgrade() function in which the code"},{"line_number":127,"context_line":"for database schema changes is to be added using the pre-defined"},{"line_number":128,"context_line":"`built-in operations`_ objects provided by Alembic such as create_table,"},{"line_number":129,"context_line":"delete_table etc. The \u0027revision\u0027 and \u0027down revision\u0027 identifiers helps Alembic to"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_4f2162fd","line":126,"range":{"start_line":126,"start_character":33,"end_line":126,"end_character":37},"updated":"2020-01-14 20:27:27.000000000","message":"s/have/have an/","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    def upgrade():"},{"line_number":124,"context_line":"        pass"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"The newly created revisions will have upgrade() function in which the code"},{"line_number":127,"context_line":"for database schema changes is to be added using the pre-defined"},{"line_number":128,"context_line":"`built-in operations`_ objects provided by Alembic such as create_table,"},{"line_number":129,"context_line":"delete_table etc. The \u0027revision\u0027 and \u0027down revision\u0027 identifiers helps Alembic to"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_73b5f8ce","line":126,"range":{"start_line":126,"start_character":33,"end_line":126,"end_character":37},"in_reply_to":"3fa7e38b_4f2162fd","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":128,"context_line":"`built-in operations`_ objects provided by Alembic such as create_table,"},{"line_number":129,"context_line":"delete_table etc. The \u0027revision\u0027 and \u0027down revision\u0027 identifiers helps Alembic to"},{"line_number":130,"context_line":"maintain the revisions in sequence. The \"None\" value of down_revision states that"},{"line_number":131,"context_line":"this is the latest revision.The next revision created will store the revision id of"},{"line_number":132,"context_line":"the revision created just before in the down_revision of it and so on for the other"},{"line_number":133,"context_line":"newly created revisions."},{"line_number":134,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_0f1b6acb","line":131,"updated":"2020-01-14 20:27:27.000000000","message":"nit: needs a space here","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":128,"context_line":"`built-in operations`_ objects provided by Alembic such as create_table,"},{"line_number":129,"context_line":"delete_table etc. The \u0027revision\u0027 and \u0027down revision\u0027 identifiers helps Alembic to"},{"line_number":130,"context_line":"maintain the revisions in sequence. The \"None\" value of down_revision states that"},{"line_number":131,"context_line":"this is the latest revision.The next revision created will store the revision id of"},{"line_number":132,"context_line":"the revision created just before in the down_revision of it and so on for the other"},{"line_number":133,"context_line":"newly created revisions."},{"line_number":134,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_13acc486","line":131,"in_reply_to":"3fa7e38b_0f1b6acb","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"To achieve `schema migrations`_ expand and contract in keystone through"},{"line_number":177,"context_line":"alembic all the migration scripts will reside in the versions directory of"},{"line_number":178,"context_line":"keystone/common/sql/alembic. Further :"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"* We will use the naming convention for new revisions to maintain sequence as"},{"line_number":181,"context_line":"  \u003cthree-digit sequence number per release\u003e_[expand|contract]_\u003crelease name\u003e__\u003cvery brief description\u003e.py"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_4f664259","line":178,"range":{"start_line":178,"start_character":36,"end_line":178,"end_character":37},"updated":"2020-01-14 20:27:27.000000000","message":"nit: remove space here","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"To achieve `schema migrations`_ expand and contract in keystone through"},{"line_number":177,"context_line":"alembic all the migration scripts will reside in the versions directory of"},{"line_number":178,"context_line":"keystone/common/sql/alembic. Further :"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"* We will use the naming convention for new revisions to maintain sequence as"},{"line_number":181,"context_line":"  \u003cthree-digit sequence number per release\u003e_[expand|contract]_\u003crelease name\u003e__\u003cvery brief description\u003e.py"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_f3c0082f","line":178,"range":{"start_line":178,"start_character":36,"end_line":178,"end_character":37},"in_reply_to":"3fa7e38b_4f664259","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        \u003cyour schema changes here\u003e"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"* The \u0027revision\u0027 identifier can be set as any string. The \u0027down_revision\u0027"},{"line_number":204,"context_line":"  identifier is to be set always which will be None in the very first script"},{"line_number":205,"context_line":"  i.e stein_inital in our case and other revisions will point to the last"},{"line_number":206,"context_line":"  migration to be updated while writing any new revision."},{"line_number":207,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_8fcafa16","line":204,"range":{"start_line":204,"start_character":13,"end_line":204,"end_character":38},"updated":"2020-01-14 20:27:27.000000000","message":"imo can remove these words here","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        \u003cyour schema changes here\u003e"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"* The \u0027revision\u0027 identifier can be set as any string. The \u0027down_revision\u0027"},{"line_number":204,"context_line":"  identifier is to be set always which will be None in the very first script"},{"line_number":205,"context_line":"  i.e stein_inital in our case and other revisions will point to the last"},{"line_number":206,"context_line":"  migration to be updated while writing any new revision."},{"line_number":207,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_b3ba90b7","line":204,"range":{"start_line":204,"start_character":13,"end_line":204,"end_character":38},"in_reply_to":"3fa7e38b_8fcafa16","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"* As per zero downtime the expand migrations needs to be run first followed by contract"},{"line_number":209,"context_line":"  migrations. Thus \u0027depends_on\u0027 identifier will be used to establish dependency between"},{"line_number":210,"context_line":"  the expand migrations and contract migrations. Every contract migration in Keystone MUST"},{"line_number":211,"context_line":"  depend on its corresponding expand migration."},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"* The data migrations will reside in data_migrations package inside the alembic migrations"},{"line_number":214,"context_line":"  directory with the naming convention 001_migrate_train_add_X_table.py and structure below :"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_6fd1beca","line":211,"range":{"start_line":210,"start_character":49,"end_line":211,"end_character":47},"updated":"2020-01-14 20:27:27.000000000","message":"This could almost be a ..note block here if the MUST is really something we want to highlight imo","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"* As per zero downtime the expand migrations needs to be run first followed by contract"},{"line_number":209,"context_line":"  migrations. Thus \u0027depends_on\u0027 identifier will be used to establish dependency between"},{"line_number":210,"context_line":"  the expand migrations and contract migrations. Every contract migration in Keystone MUST"},{"line_number":211,"context_line":"  depend on its corresponding expand migration."},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"* The data migrations will reside in data_migrations package inside the alembic migrations"},{"line_number":214,"context_line":"  directory with the naming convention 001_migrate_train_add_X_table.py and structure below :"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_33e460df","line":211,"range":{"start_line":210,"start_character":49,"end_line":211,"end_character":47},"in_reply_to":"3fa7e38b_6fd1beca","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":211,"context_line":"  depend on its corresponding expand migration."},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"* The data migrations will reside in data_migrations package inside the alembic migrations"},{"line_number":214,"context_line":"  directory with the naming convention 001_migrate_train_add_X_table.py and structure below :"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":".. code-block:: python"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_cfe9d282","line":214,"range":{"start_line":214,"start_character":91,"end_line":214,"end_character":92},"updated":"2020-01-14 20:27:27.000000000","message":"nit extra space","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":211,"context_line":"  depend on its corresponding expand migration."},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"* The data migrations will reside in data_migrations package inside the alembic migrations"},{"line_number":214,"context_line":"  directory with the naming convention 001_migrate_train_add_X_table.py and structure below :"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":".. code-block:: python"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_93d434ec","line":214,"range":{"start_line":214,"start_character":91,"end_line":214,"end_character":92},"in_reply_to":"3fa7e38b_cfe9d282","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"None"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"Performance Impact"},{"line_number":281,"context_line":"------------------"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"None"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_cf8eb2d6","line":280,"range":{"start_line":280,"start_character":0,"end_line":280,"end_character":18},"updated":"2020-01-14 20:27:27.000000000","message":"Will this improve/worsen db_sync time?","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"e67ff0c53755adac60df4929079a188620e03636","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"None"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"Performance Impact"},{"line_number":281,"context_line":"------------------"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"None"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_bb4266ab","line":280,"range":{"start_line":280,"start_character":0,"end_line":280,"end_character":18},"in_reply_to":"3fa7e38b_cf8eb2d6","updated":"2020-01-17 10:46:39.000000000","message":"There is not enough documentation stating about the performance impact [1]. Surely it won\u0027t worsen the performance. So for now I left this section as None.\n\n[1] https://pypi.org/project/alembic/","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"03e02568efa589a567ad8760d48a92386add8536","unresolved":false,"context_lines":[{"line_number":295,"context_line":"----------------"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"A database migration script is required when you submit a change to Keystone"},{"line_number":298,"context_line":"that alters the database model definition.  The migration script is a special"},{"line_number":299,"context_line":"python file that includes code to update/downgrade the database to match the"},{"line_number":300,"context_line":"changes in the model definition. Alembic will execute these scripts in order to"},{"line_number":301,"context_line":"provide a linear migration path between revision. The Developers can use"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_0f8ccad6","line":298,"range":{"start_line":298,"start_character":43,"end_line":298,"end_character":44},"updated":"2020-01-14 20:27:27.000000000","message":"nit extra space","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"c7939e4d4efcc6c3ba7493444ccf2578b4af6273","unresolved":false,"context_lines":[{"line_number":295,"context_line":"----------------"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"A database migration script is required when you submit a change to Keystone"},{"line_number":298,"context_line":"that alters the database model definition.  The migration script is a special"},{"line_number":299,"context_line":"python file that includes code to update/downgrade the database to match the"},{"line_number":300,"context_line":"changes in the model definition. Alembic will execute these scripts in order to"},{"line_number":301,"context_line":"provide a linear migration path between revision. The Developers can use"}],"source_content_type":"text/x-rst","patch_set":11,"id":"3fa7e38b_33fd406d","line":298,"range":{"start_line":298,"start_character":43,"end_line":298,"end_character":44},"in_reply_to":"3fa7e38b_0f8ccad6","updated":"2020-01-17 07:28:44.000000000","message":"Done","commit_id":"4537327d1520faccb23427a4020195381862f689"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"276d24c6b9812c09ebc96f6567604e151bfe3942","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"The new command utility to create a new Revision::"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"   $ keystone-manage revision -m \"create a new revision\""},{"line_number":102,"context_line":"   Generating /keystone/common/sql/alembic/versions/g33gk56lp8n3n_create_a_new_revision...done"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"The generated Revision will look like:"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_5904937d","line":101,"updated":"2020-01-17 21:24:41.000000000","message":"As mentioned previously, we must not use the keystone-manage command for developer-specific operations. keystone-manage is for operators to administer keystone, it is not for developer convenience. Make this a tox command.","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"865027e2164e7cde3dd578d940ec0e300e698596","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"The new command utility to create a new Revision::"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"   $ keystone-manage revision -m \"create a new revision\""},{"line_number":102,"context_line":"   Generating /keystone/common/sql/alembic/versions/g33gk56lp8n3n_create_a_new_revision...done"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"The generated Revision will look like:"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_81da89e3","line":101,"in_reply_to":"3fa7e38b_5904937d","updated":"2020-01-20 07:48:52.000000000","message":"Using the alembic utility for developers. Updated with \n$ alembic revision -m \"create a new revision\"","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"276d24c6b9812c09ebc96f6567604e151bfe3942","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    keystone-manage db_sync"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Several other command utilities will be added to keystone-manage like these:"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"To check the current database version::"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_39267724","line":142,"range":{"start_line":142,"start_character":40,"end_line":142,"end_character":45},"updated":"2020-01-17 21:24:41.000000000","message":"none of these need to be added...","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"865027e2164e7cde3dd578d940ec0e300e698596","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    keystone-manage db_sync"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Several other command utilities will be added to keystone-manage like these:"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"To check the current database version::"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_21eb957b","line":142,"range":{"start_line":142,"start_character":40,"end_line":142,"end_character":45},"in_reply_to":"3fa7e38b_39267724","updated":"2020-01-20 07:48:52.000000000","message":"Done","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"276d24c6b9812c09ebc96f6567604e151bfe3942","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"To check the current database version::"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    keystone-manage db_version"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"To create a SQL script to run the migration offline::"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_f92f7ff2","line":146,"updated":"2020-01-17 21:24:41.000000000","message":"...this exists already","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"865027e2164e7cde3dd578d940ec0e300e698596","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"To check the current database version::"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    keystone-manage db_version"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"To create a SQL script to run the migration offline::"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_41bc916a","line":146,"in_reply_to":"3fa7e38b_f92f7ff2","updated":"2020-01-20 07:48:52.000000000","message":"Removed the commands to be added Line.","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"276d24c6b9812c09ebc96f6567604e151bfe3942","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"To create a SQL script to run the migration offline::"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    keystone-manage upgrade head sql"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"To Upgrade the database incrementally::"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_b9390741","line":150,"updated":"2020-01-17 21:24:41.000000000","message":"...this is just the db_sync command","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"865027e2164e7cde3dd578d940ec0e300e698596","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"To create a SQL script to run the migration offline::"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    keystone-manage upgrade head sql"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"To Upgrade the database incrementally::"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_01b6998a","line":150,"in_reply_to":"3fa7e38b_b9390741","updated":"2020-01-20 07:48:52.000000000","message":"Done","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"276d24c6b9812c09ebc96f6567604e151bfe3942","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    keystone-manage upgrade head sql"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"To Upgrade the database incrementally::"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    keystone-manage upgrade --delta"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_390f578c","line":152,"range":{"start_line":152,"start_character":24,"end_line":152,"end_character":37},"updated":"2020-01-17 21:24:41.000000000","message":"what does this mean?","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"865027e2164e7cde3dd578d940ec0e300e698596","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    keystone-manage upgrade head sql"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"To Upgrade the database incrementally::"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    keystone-manage upgrade --delta"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_016bf9ef","line":152,"range":{"start_line":152,"start_character":24,"end_line":152,"end_character":37},"in_reply_to":"3fa7e38b_390f578c","updated":"2020-01-20 07:48:52.000000000","message":"Removed it. I think we don\u0027t require this as it helps to specify some range for the upgrade.","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"276d24c6b9812c09ebc96f6567604e151bfe3942","unresolved":false,"context_lines":[{"line_number":168,"context_line":"The migration timeline should remain linear so that there is a clear path when"},{"line_number":169,"context_line":"upgrading. To verify that the timeline does branch, you can run this command::"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    keystone-manage check migration"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"If the migration path does branch, you can find the branch point::"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_d91de3bf","line":171,"updated":"2020-01-17 21:24:41.000000000","message":"I think this corresponds to db_sync --check which already exists?","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"865027e2164e7cde3dd578d940ec0e300e698596","unresolved":false,"context_lines":[{"line_number":168,"context_line":"The migration timeline should remain linear so that there is a clear path when"},{"line_number":169,"context_line":"upgrading. To verify that the timeline does branch, you can run this command::"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    keystone-manage check migration"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"If the migration path does branch, you can find the branch point::"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_a171c5e1","line":171,"in_reply_to":"3fa7e38b_d91de3bf","updated":"2020-01-20 07:48:52.000000000","message":"Done","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"276d24c6b9812c09ebc96f6567604e151bfe3942","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    keystone-manage check migration"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"If the migration path does branch, you can find the branch point::"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    keystone-manage history"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_99176b9e","line":173,"range":{"start_line":173,"start_character":27,"end_line":173,"end_character":33},"updated":"2020-01-17 21:24:41.000000000","message":"What does this mean? Why would the migration path ever branch?","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"865027e2164e7cde3dd578d940ec0e300e698596","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    keystone-manage check migration"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"If the migration path does branch, you can find the branch point::"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    keystone-manage history"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_c16c0107","line":173,"range":{"start_line":173,"start_character":27,"end_line":173,"end_character":33},"in_reply_to":"3fa7e38b_99176b9e","updated":"2020-01-20 07:48:52.000000000","message":"Done","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"276d24c6b9812c09ebc96f6567604e151bfe3942","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    keystone-manage history"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"To achieve `schema migrations`_ expand and contract in keystone through"},{"line_number":178,"context_line":"alembic all the migration scripts will reside in the versions directory of"},{"line_number":179,"context_line":"keystone/common/sql/alembic. Further:"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_996c4b34","line":177,"range":{"start_line":177,"start_character":32,"end_line":177,"end_character":51},"updated":"2020-01-17 21:24:41.000000000","message":"expand-migrate-contract","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"865027e2164e7cde3dd578d940ec0e300e698596","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    keystone-manage history"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"To achieve `schema migrations`_ expand and contract in keystone through"},{"line_number":178,"context_line":"alembic all the migration scripts will reside in the versions directory of"},{"line_number":179,"context_line":"keystone/common/sql/alembic. Further:"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_617bcdbe","line":177,"range":{"start_line":177,"start_character":32,"end_line":177,"end_character":51},"in_reply_to":"3fa7e38b_996c4b34","updated":"2020-01-20 07:48:52.000000000","message":"Done","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"276d24c6b9812c09ebc96f6567604e151bfe3942","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"To achieve `schema migrations`_ expand and contract in keystone through"},{"line_number":178,"context_line":"alembic all the migration scripts will reside in the versions directory of"},{"line_number":179,"context_line":"keystone/common/sql/alembic. Further:"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"* We will use the naming convention for new revisions to maintain sequence as"},{"line_number":182,"context_line":"  \u003cthree-digit sequence number per release\u003e_[expand|contract]_\u003crelease name\u003e__\u003cvery brief description\u003e.py"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_59601335","line":179,"updated":"2020-01-17 21:24:41.000000000","message":"With what is described below, are we going to still be able to accomplish rolling upgrades by running the expand, migrate, and contract phases in separate stages?\n\nIt would be really valuable if we had rolling upgrades in CI so that we could validate that a major refactor like this doesn\u0027t break those, I would almost like to say that that should happen before we incorporate this spec into our cycle plan :/","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"865027e2164e7cde3dd578d940ec0e300e698596","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"To achieve `schema migrations`_ expand and contract in keystone through"},{"line_number":178,"context_line":"alembic all the migration scripts will reside in the versions directory of"},{"line_number":179,"context_line":"keystone/common/sql/alembic. Further:"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"* We will use the naming convention for new revisions to maintain sequence as"},{"line_number":182,"context_line":"  \u003cthree-digit sequence number per release\u003e_[expand|contract]_\u003crelease name\u003e__\u003cvery brief description\u003e.py"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_2147157d","line":179,"in_reply_to":"3fa7e38b_59601335","updated":"2020-01-20 07:48:52.000000000","message":"Sure I will put this on hole until I add rolling upgrade CI to our gate.","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"276d24c6b9812c09ebc96f6567604e151bfe3942","unresolved":false,"context_lines":[{"line_number":319,"context_line":"  en/latest/tutorial.html#the-migration-environment\u003e`_"},{"line_number":320,"context_line":"* helper scripts for creating initial Keystone DB schema"},{"line_number":321,"context_line":"* ``versions`` directory inside alembic_migrations, containing migration"},{"line_number":322,"context_line":"  scripts added in different release cycles."},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"Assignee(s)"},{"line_number":325,"context_line":"-----------"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_19cffb28","line":322,"updated":"2020-01-17 21:24:41.000000000","message":"This part can be removed, it\u0027s included as part of the Proposed Changes section. Check the template, this Implementation section need only include the assignees and work items.","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"865027e2164e7cde3dd578d940ec0e300e698596","unresolved":false,"context_lines":[{"line_number":319,"context_line":"  en/latest/tutorial.html#the-migration-environment\u003e`_"},{"line_number":320,"context_line":"* helper scripts for creating initial Keystone DB schema"},{"line_number":321,"context_line":"* ``versions`` directory inside alembic_migrations, containing migration"},{"line_number":322,"context_line":"  scripts added in different release cycles."},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"Assignee(s)"},{"line_number":325,"context_line":"-----------"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3fa7e38b_e1401d62","line":322,"in_reply_to":"3fa7e38b_19cffb28","updated":"2020-01-20 07:48:52.000000000","message":"Done","commit_id":"1860f6da5de5aaedf4ac0d5985169cab2bcef193"}],"specs/keystone/ussuri/alembic_migrations.rst":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"`bug #1816107 \u003chttps://bugs.launchpad.net/keystone/+bug/1816107\u003e`_"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This spec explains the benefits of automatically generating migrations with"},{"line_number":14,"context_line":"Alembic when using SQLAlchemy."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_76f81849","line":13,"range":{"start_line":13,"start_character":35,"end_line":13,"end_character":70},"updated":"2019-12-10 18:02:09.000000000","message":"Is this the only/main benefit? What\u0027s so difficult about the way we do it now? Please explain in the problem description.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"`bug #1816107 \u003chttps://bugs.launchpad.net/keystone/+bug/1816107\u003e`_"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This spec explains the benefits of automatically generating migrations with"},{"line_number":14,"context_line":"Alembic when using SQLAlchemy."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_d6fd4c3b","line":13,"range":{"start_line":13,"start_character":23,"end_line":13,"end_character":31},"updated":"2019-12-10 18:02:09.000000000","message":"Specs are like architectural blueprints, this should describe the technical details of what the change is going to look like when completed, not just persuade the reader of the benefits. \"benefits\" should be framed in terms of a problem description, i.e. what about the way we currently do things is causing problems that require this change?","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"241cd854ce4bcf9b3da18ec660107a55acd35d8a","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"`bug #1816107 \u003chttps://bugs.launchpad.net/keystone/+bug/1816107\u003e`_"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This spec explains the benefits of automatically generating migrations with"},{"line_number":14,"context_line":"Alembic when using SQLAlchemy."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_152749b8","line":13,"range":{"start_line":13,"start_character":23,"end_line":13,"end_character":31},"in_reply_to":"3fa7e38b_d6fd4c3b","updated":"2019-12-11 17:02:52.000000000","message":"Updated the section.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Database migrations are implemented in Keystone using SQLAlchemy- migrate"},{"line_number":20,"context_line":"scripts. The frequent schema changes, such as adding or deleting columns or"},{"line_number":21,"context_line":"writing your own migration scripts could be challenging to tackle and also"},{"line_number":22,"context_line":"hard to maintain. This approach makes designing migrations for `rolling upgrades`_"},{"line_number":23,"context_line":"extremely uncomfortable. The ``expand`` and ``contract`` migrations would have to"},{"line_number":24,"context_line":"be created in strict sequential order with all of the latter following all of the"},{"line_number":25,"context_line":"former. This places unnecessary restrictions on the order of migrations and becomes"},{"line_number":26,"context_line":"very error prone as multiple schema changes are introduced in a single cycle."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_768d78d2","line":23,"range":{"start_line":22,"start_character":18,"end_line":23,"end_character":24},"updated":"2019-12-10 18:02:09.000000000","message":"We\u0027ve been doing it this way for a long time and I\u0027m not aware of it being particularly uncomfortable, I think we need other rationalizations for this.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"241cd854ce4bcf9b3da18ec660107a55acd35d8a","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Database migrations are implemented in Keystone using SQLAlchemy- migrate"},{"line_number":20,"context_line":"scripts. The frequent schema changes, such as adding or deleting columns or"},{"line_number":21,"context_line":"writing your own migration scripts could be challenging to tackle and also"},{"line_number":22,"context_line":"hard to maintain. This approach makes designing migrations for `rolling upgrades`_"},{"line_number":23,"context_line":"extremely uncomfortable. The ``expand`` and ``contract`` migrations would have to"},{"line_number":24,"context_line":"be created in strict sequential order with all of the latter following all of the"},{"line_number":25,"context_line":"former. This places unnecessary restrictions on the order of migrations and becomes"},{"line_number":26,"context_line":"very error prone as multiple schema changes are introduced in a single cycle."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_752b1d7b","line":23,"range":{"start_line":22,"start_character":18,"end_line":23,"end_character":24},"in_reply_to":"3fa7e38b_768d78d2","updated":"2019-12-11 17:02:52.000000000","message":"Added the benefits of using Alembic in this section.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Alembic is a very convenient tool for performing migrations with SQLAlchemy."},{"line_number":38,"context_line":"We are proposing to port the migration flows to be handled by `Alembic`_. There"},{"line_number":39,"context_line":"are numerous benefits to this change."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of placeholders"},{"line_number":42,"context_line":"  created for whatever required to be `backported`_."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_369aa0c4","line":39,"range":{"start_line":38,"start_character":74,"end_line":39,"end_character":37},"updated":"2019-12-10 18:02:09.000000000","message":"The Proposed Change section is not the place to describe the benefits. The \"why\" of the change belongs in the Problem Description. This section should describe the technical details of what is going to change. What you put under Implementation should be here instead.\n\nIt looks like you copied the glance spec https://specs.openstack.org/openstack/glance-specs/specs/ocata/implemented/glance/alembic-migrations.html instead of using the keystone template, please use the keystone template and fill in the sections relevant to the keystone project, or simply move the backlog version of this spec to this directory and edit it.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"241cd854ce4bcf9b3da18ec660107a55acd35d8a","unresolved":false,"context_lines":[{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Alembic is a very convenient tool for performing migrations with SQLAlchemy."},{"line_number":38,"context_line":"We are proposing to port the migration flows to be handled by `Alembic`_. There"},{"line_number":39,"context_line":"are numerous benefits to this change."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of placeholders"},{"line_number":42,"context_line":"  created for whatever required to be `backported`_."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_f554edfe","line":39,"range":{"start_line":38,"start_character":74,"end_line":39,"end_character":37},"in_reply_to":"3fa7e38b_369aa0c4","updated":"2019-12-11 17:02:52.000000000","message":"The technical details and changes to be done in keystone are updated.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"are numerous benefits to this change."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of placeholders"},{"line_number":42,"context_line":"  created for whatever required to be `backported`_."},{"line_number":43,"context_line":"* Alembic maintains a alembic_version table to store the current version of the migration,"},{"line_number":44,"context_line":"  so as to calculate and run upgrade till database version requested."},{"line_number":45,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s ORM."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_b6ce9080","line":42,"updated":"2019-12-10 18:02:09.000000000","message":"This is the section where you would explain the technical details of how this works.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"241cd854ce4bcf9b3da18ec660107a55acd35d8a","unresolved":false,"context_lines":[{"line_number":39,"context_line":"are numerous benefits to this change."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of placeholders"},{"line_number":42,"context_line":"  created for whatever required to be `backported`_."},{"line_number":43,"context_line":"* Alembic maintains a alembic_version table to store the current version of the migration,"},{"line_number":44,"context_line":"  so as to calculate and run upgrade till database version requested."},{"line_number":45,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s ORM."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_b53af5c0","line":42,"in_reply_to":"3fa7e38b_b6ce9080","updated":"2019-12-11 17:02:52.000000000","message":"Done","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of placeholders"},{"line_number":42,"context_line":"  created for whatever required to be `backported`_."},{"line_number":43,"context_line":"* Alembic maintains a alembic_version table to store the current version of the migration,"},{"line_number":44,"context_line":"  so as to calculate and run upgrade till database version requested."},{"line_number":45,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s ORM."},{"line_number":46,"context_line":"  This make the whole process of altering the database very easy: once Alembic is set,"},{"line_number":47,"context_line":"  you will only need simple commands to upgrade your database! It recognizes the differences"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_d6c9cc78","line":44,"updated":"2019-12-10 18:02:09.000000000","message":"Isn\u0027t this the same as what sqlalchemy-migrate does?","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"d2c104255d9793e4b747568d86084b525a8a5320","unresolved":false,"context_lines":[{"line_number":41,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of placeholders"},{"line_number":42,"context_line":"  created for whatever required to be `backported`_."},{"line_number":43,"context_line":"* Alembic maintains a alembic_version table to store the current version of the migration,"},{"line_number":44,"context_line":"  so as to calculate and run upgrade till database version requested."},{"line_number":45,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s ORM."},{"line_number":46,"context_line":"  This make the whole process of altering the database very easy: once Alembic is set,"},{"line_number":47,"context_line":"  you will only need simple commands to upgrade your database! It recognizes the differences"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_7e0aca1e","line":44,"in_reply_to":"3fa7e38b_956819ba","updated":"2019-12-17 19:52:28.000000000","message":"There is a table in the database called migrate_version that stores the current version. http://paste.openstack.org/show/787690/","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"241cd854ce4bcf9b3da18ec660107a55acd35d8a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"* Alembic supports backporting. Moving to alembic can help us to get rid of placeholders"},{"line_number":42,"context_line":"  created for whatever required to be `backported`_."},{"line_number":43,"context_line":"* Alembic maintains a alembic_version table to store the current version of the migration,"},{"line_number":44,"context_line":"  so as to calculate and run upgrade till database version requested."},{"line_number":45,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s ORM."},{"line_number":46,"context_line":"  This make the whole process of altering the database very easy: once Alembic is set,"},{"line_number":47,"context_line":"  you will only need simple commands to upgrade your database! It recognizes the differences"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_956819ba","line":44,"in_reply_to":"3fa7e38b_d6c9cc78","updated":"2019-12-11 17:02:52.000000000","message":"I am not sure if it maintains a table by itself.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s ORM."},{"line_number":46,"context_line":"  This make the whole process of altering the database very easy: once Alembic is set,"},{"line_number":47,"context_line":"  you will only need simple commands to upgrade your database! It recognizes the differences"},{"line_number":48,"context_line":"  between the tables in your database and the models defined in your Python code."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":".. _Alembic: https://alembic.sqlalchemy.org/en/latest/"},{"line_number":51,"context_line":".. _backported: https://wiki.openstack.org/wiki/Obsolete:Alembic"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_f693a84c","line":48,"updated":"2019-12-10 18:02:09.000000000","message":"You copied this from someone\u0027s blog post: https://rodic.fr/blog/automatic-migrations-sqlalchemy-alembic/\n\nPlease don\u0027t take someone else\u0027s writing and use it without attribution.\n\nThis should explain the technical details of how this works and how it affects the keystone project\u0027s migrations. Examples of how we would generate these migrations would be good here.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"241cd854ce4bcf9b3da18ec660107a55acd35d8a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"* Alembic supports automatic generation of migration scripts using SQLAlchemy’s ORM."},{"line_number":46,"context_line":"  This make the whole process of altering the database very easy: once Alembic is set,"},{"line_number":47,"context_line":"  you will only need simple commands to upgrade your database! It recognizes the differences"},{"line_number":48,"context_line":"  between the tables in your database and the models defined in your Python code."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":".. _Alembic: https://alembic.sqlalchemy.org/en/latest/"},{"line_number":51,"context_line":".. _backported: https://wiki.openstack.org/wiki/Obsolete:Alembic"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_55b3814e","line":48,"in_reply_to":"3fa7e38b_f693a84c","updated":"2019-12-11 17:02:52.000000000","message":"I will take care of this from next time. I removed it.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  between the tables in your database and the models defined in your Python code."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":".. _Alembic: https://alembic.sqlalchemy.org/en/latest/"},{"line_number":51,"context_line":".. _backported: https://wiki.openstack.org/wiki/Obsolete:Alembic"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"To configure alembic migration tool install and execute the following command \u0027alembic init alembic\u0027"},{"line_number":54,"context_line":"This will create both an alembic directory and an alembic.ini configuration file."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_f6b088ff","line":51,"range":{"start_line":51,"start_character":48,"end_line":51,"end_character":57},"updated":"2019-12-10 18:02:09.000000000","message":"It concerns me that this is marked \"Obsolete\". It looks like the nova team never did anything with this. Is there something more up to date you can link to?","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"241cd854ce4bcf9b3da18ec660107a55acd35d8a","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  between the tables in your database and the models defined in your Python code."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":".. _Alembic: https://alembic.sqlalchemy.org/en/latest/"},{"line_number":51,"context_line":".. _backported: https://wiki.openstack.org/wiki/Obsolete:Alembic"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"To configure alembic migration tool install and execute the following command \u0027alembic init alembic\u0027"},{"line_number":54,"context_line":"This will create both an alembic directory and an alembic.ini configuration file."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_75aebde4","line":51,"range":{"start_line":51,"start_character":48,"end_line":51,"end_character":57},"in_reply_to":"3fa7e38b_f6b088ff","updated":"2019-12-11 17:02:52.000000000","message":"I removed this URL too.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":102,"context_line":"that alters the database model definition.  The migration script is a special"},{"line_number":103,"context_line":"python file that includes code to update/downgrade the database to match the"},{"line_number":104,"context_line":"changes in the model definition. Alembic will execute these scripts in order to"},{"line_number":105,"context_line":"provide a linear migration path between revision. The keystone-manage command"},{"line_number":106,"context_line":"can be used to generate migration template for you to complete.  The operations"},{"line_number":107,"context_line":"in the template are those supported by the Alembic migration library."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_562ddcfa","line":106,"range":{"start_line":105,"start_character":50,"end_line":106,"end_character":63},"updated":"2019-12-10 18:02:09.000000000","message":"Can you explain more that this means? Are developers supposed to be running the keystone-manage command?","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"241cd854ce4bcf9b3da18ec660107a55acd35d8a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"that alters the database model definition.  The migration script is a special"},{"line_number":103,"context_line":"python file that includes code to update/downgrade the database to match the"},{"line_number":104,"context_line":"changes in the model definition. Alembic will execute these scripts in order to"},{"line_number":105,"context_line":"provide a linear migration path between revision. The keystone-manage command"},{"line_number":106,"context_line":"can be used to generate migration template for you to complete.  The operations"},{"line_number":107,"context_line":"in the template are those supported by the Alembic migration library."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_1583c957","line":106,"range":{"start_line":105,"start_character":50,"end_line":106,"end_character":63},"in_reply_to":"3fa7e38b_562ddcfa","updated":"2019-12-11 17:02:52.000000000","message":"Done","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":155,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"The new database version names resulting from the move to Alembic will need to"},{"line_number":158,"context_line":"be documented to make developers aware of the change to ``db_version`` output."},{"line_number":159,"context_line":"The documents will be added for brief description of the alembic installation and"},{"line_number":160,"context_line":"creation of new directory /files inside keystone code base. How the migrations will"},{"line_number":161,"context_line":"be created and executed. The overview of new keystone-manage command utility added"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_7671f80c","line":158,"range":{"start_line":158,"start_character":22,"end_line":158,"end_character":32},"updated":"2019-12-10 18:02:09.000000000","message":"s/developers/operators/ ?","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"241cd854ce4bcf9b3da18ec660107a55acd35d8a","unresolved":false,"context_lines":[{"line_number":155,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"The new database version names resulting from the move to Alembic will need to"},{"line_number":158,"context_line":"be documented to make developers aware of the change to ``db_version`` output."},{"line_number":159,"context_line":"The documents will be added for brief description of the alembic installation and"},{"line_number":160,"context_line":"creation of new directory /files inside keystone code base. How the migrations will"},{"line_number":161,"context_line":"be created and executed. The overview of new keystone-manage command utility added"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_d578d17e","line":158,"range":{"start_line":158,"start_character":22,"end_line":158,"end_character":32},"in_reply_to":"3fa7e38b_7671f80c","updated":"2019-12-11 17:02:52.000000000","message":"Done","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b7c6441092562bcd536271a13a21fb7cb13be10c","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        \u003chttp://alembic.zzzcomputing.com/en/latest/\u003e`_"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":".. [2] `Keystone\u0027s specification"},{"line_number":172,"context_line":"        \u003chttps://specs.openstack.org/openstack/keystone-specs/specs/keystone/backlog/alembic.html\u003e`_"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_1639a4ef","line":172,"updated":"2019-12-10 18:02:09.000000000","message":"We need to be proposing this spec to ussuri/, it should not be left here for reference.","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"241cd854ce4bcf9b3da18ec660107a55acd35d8a","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        \u003chttp://alembic.zzzcomputing.com/en/latest/\u003e`_"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":".. [2] `Keystone\u0027s specification"},{"line_number":172,"context_line":"        \u003chttps://specs.openstack.org/openstack/keystone-specs/specs/keystone/backlog/alembic.html\u003e`_"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3fa7e38b_9596d993","line":172,"in_reply_to":"3fa7e38b_1639a4ef","updated":"2019-12-11 17:02:52.000000000","message":"Done","commit_id":"6f6b1c5107e34f1f6d52ebecc744dac06d114d3c"}]}
