)]}'
{"doc/source/contributor/index.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":369,"context_line":"It\u0027s also possible to use gabbi against a running placement service, for"},{"line_number":370,"context_line":"example in devstack. See `gabbi-run`_ to get started."},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"Database Schema Changes"},{"line_number":373,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"At some point in every application\u0027s life it becomes necessary to change the"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_9e89e12a","line":372,"updated":"2018-11-14 16:28:50.000000000","message":"nit: rather than throw this in the index, which is already huge, put it in a separate doc and just link it from the index.","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"At some point in every application\u0027s life it becomes necessary to change the"},{"line_number":376,"context_line":"structure of its database. Modifying the SQLAlchemy models (in"},{"line_number":377,"context_line":"placement/db/sqlachemy/models.py) is necessary for the application t o"},{"line_number":378,"context_line":"understand the new structure, but that won\u0027t change the actual underlying"},{"line_number":379,"context_line":"database. To do that, Placement uses `alembic` to run database migrations."},{"line_number":380,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_3e968d4c","line":377,"range":{"start_line":377,"start_character":67,"end_line":377,"end_character":70},"updated":"2018-11-14 16:28:50.000000000","message":"to","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"At some point in every application\u0027s life it becomes necessary to change the"},{"line_number":376,"context_line":"structure of its database. Modifying the SQLAlchemy models (in"},{"line_number":377,"context_line":"placement/db/sqlachemy/models.py) is necessary for the application t o"},{"line_number":378,"context_line":"understand the new structure, but that won\u0027t change the actual underlying"},{"line_number":379,"context_line":"database. To do that, Placement uses `alembic` to run database migrations."},{"line_number":380,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_01fd74b7","line":377,"range":{"start_line":377,"start_character":67,"end_line":377,"end_character":70},"in_reply_to":"3f79a3b5_3e968d4c","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":375,"context_line":"At some point in every application\u0027s life it becomes necessary to change the"},{"line_number":376,"context_line":"structure of its database. Modifying the SQLAlchemy models (in"},{"line_number":377,"context_line":"placement/db/sqlachemy/models.py) is necessary for the application t o"},{"line_number":378,"context_line":"understand the new structure, but that won\u0027t change the actual underlying"},{"line_number":379,"context_line":"database. To do that, Placement uses `alembic` to run database migrations."},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"Alembic calls each change a **revision**. To create a migration with alembic,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_1e871114","line":378,"range":{"start_line":378,"start_character":39,"end_line":378,"end_character":44},"updated":"2018-11-14 16:28:50.000000000","message":"Do not use (wink) contractions in docs - they can be hard for non-native English speakers.","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":375,"context_line":"At some point in every application\u0027s life it becomes necessary to change the"},{"line_number":376,"context_line":"structure of its database. Modifying the SQLAlchemy models (in"},{"line_number":377,"context_line":"placement/db/sqlachemy/models.py) is necessary for the application t o"},{"line_number":378,"context_line":"understand the new structure, but that won\u0027t change the actual underlying"},{"line_number":379,"context_line":"database. To do that, Placement uses `alembic` to run database migrations."},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"Alembic calls each change a **revision**. To create a migration with alembic,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_e10b98d1","line":378,"range":{"start_line":378,"start_character":39,"end_line":378,"end_character":44},"in_reply_to":"3f79a3b5_1e871114","updated":"2018-11-14 17:19:40.000000000","message":"I also expanded all the other contractions in this doc.","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d3f2f15e3d015decb0d1eafa614bc0bcdc843c14","unresolved":false,"context_lines":[{"line_number":375,"context_line":"At some point in every application\u0027s life it becomes necessary to change the"},{"line_number":376,"context_line":"structure of its database. Modifying the SQLAlchemy models (in"},{"line_number":377,"context_line":"placement/db/sqlachemy/models.py) is necessary for the application t o"},{"line_number":378,"context_line":"understand the new structure, but that won\u0027t change the actual underlying"},{"line_number":379,"context_line":"database. To do that, Placement uses `alembic` to run database migrations."},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"Alembic calls each change a **revision**. To create a migration with alembic,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_c9aeba7f","line":378,"range":{"start_line":378,"start_character":39,"end_line":378,"end_character":44},"in_reply_to":"3f79a3b5_e10b98d1","updated":"2018-11-15 10:02:56.000000000","message":"OK, that\u0027s unrelated and clutters up this change, which is part of why I said to put the new content in a new sub-doc, but OK.","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":379,"context_line":"database. To do that, Placement uses `alembic` to run database migrations."},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"Alembic calls each change a **revision**. To create a migration with alembic,"},{"line_number":382,"context_line":"run the `alembic revision` comman. Alembic will then generate a new revision"},{"line_number":383,"context_line":"file with a unique file name, and place it in the `alembic/versions/`"},{"line_number":384,"context_line":"directory::"},{"line_number":385,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_9e72414b","line":382,"range":{"start_line":382,"start_character":27,"end_line":382,"end_character":33},"updated":"2018-11-14 16:28:50.000000000","message":"command","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":379,"context_line":"database. To do that, Placement uses `alembic` to run database migrations."},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"Alembic calls each change a **revision**. To create a migration with alembic,"},{"line_number":382,"context_line":"run the `alembic revision` comman. Alembic will then generate a new revision"},{"line_number":383,"context_line":"file with a unique file name, and place it in the `alembic/versions/`"},{"line_number":384,"context_line":"directory::"},{"line_number":385,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_81f0a4dd","line":382,"range":{"start_line":382,"start_character":27,"end_line":382,"end_character":33},"in_reply_to":"3f79a3b5_9e72414b","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":381,"context_line":"Alembic calls each change a **revision**. To create a migration with alembic,"},{"line_number":382,"context_line":"run the `alembic revision` comman. Alembic will then generate a new revision"},{"line_number":383,"context_line":"file with a unique file name, and place it in the `alembic/versions/`"},{"line_number":384,"context_line":"directory::"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"  ed@devenv:~/projects/placement$ alembic -c placement/db/sqlalchemy/alembic.ini revision -m \"Add column foo to bar table\""},{"line_number":387,"context_line":"  Generating /home/ed/projects/placement/placement/db/sqlalchemy/alembic/versions/dfb006498ad2_add_column_foo_to_bar_table.py ... done"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_1e8cf12b","line":384,"range":{"start_line":384,"start_character":9,"end_line":384,"end_character":11},"updated":"2018-11-14 16:28:50.000000000","message":"nit: this is normally done with:\n\n.. code-block:: console","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":381,"context_line":"Alembic calls each change a **revision**. To create a migration with alembic,"},{"line_number":382,"context_line":"run the `alembic revision` comman. Alembic will then generate a new revision"},{"line_number":383,"context_line":"file with a unique file name, and place it in the `alembic/versions/`"},{"line_number":384,"context_line":"directory::"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"  ed@devenv:~/projects/placement$ alembic -c placement/db/sqlalchemy/alembic.ini revision -m \"Add column foo to bar table\""},{"line_number":387,"context_line":"  Generating /home/ed/projects/placement/placement/db/sqlalchemy/alembic/versions/dfb006498ad2_add_column_foo_to_bar_table.py ... done"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_c1a21cad","line":384,"range":{"start_line":384,"start_character":9,"end_line":384,"end_character":11},"in_reply_to":"3f79a3b5_1e8cf12b","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":387,"context_line":"  Generating /home/ed/projects/placement/placement/db/sqlalchemy/alembic/versions/dfb006498ad2_add_column_foo_to_bar_table.py ... done"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"Let\u0027s break down that command:"},{"line_number":390,"context_line":" - The **-c** parameter tells alembic where to find its configuration file."},{"line_number":391,"context_line":" - **revision** is the alembic subcommand for creating a new revision file."},{"line_number":392,"context_line":" - The **-m** parameter specifies a brief comment explaining the change."},{"line_number":393,"context_line":" - The generated file from alembic will have a name consisting of a random hash"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_5ea10992","line":390,"updated":"2018-11-14 16:28:50.000000000","message":"Add a blank line before the bullet list, and nix the empty space on each item line to fix the formatting.","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":387,"context_line":"  Generating /home/ed/projects/placement/placement/db/sqlalchemy/alembic/versions/dfb006498ad2_add_column_foo_to_bar_table.py ... done"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"Let\u0027s break down that command:"},{"line_number":390,"context_line":" - The **-c** parameter tells alembic where to find its configuration file."},{"line_number":391,"context_line":" - **revision** is the alembic subcommand for creating a new revision file."},{"line_number":392,"context_line":" - The **-m** parameter specifies a brief comment explaining the change."},{"line_number":393,"context_line":" - The generated file from alembic will have a name consisting of a random hash"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_41960c4d","line":390,"in_reply_to":"3f79a3b5_5ea10992","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":395,"context_line":"   **.py** extension. So be sure to keep your comment as brief as possible"},{"line_number":396,"context_line":"   while still being descriptive."},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"The generated file will look something like this::"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":" \"\"\"Add column foo to bar table"},{"line_number":401,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_3ebd2db2","line":398,"range":{"start_line":398,"start_character":48,"end_line":398,"end_character":50},"updated":"2018-11-14 16:28:50.000000000","message":"Use:\n\n.. code-block:: python","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":395,"context_line":"   **.py** extension. So be sure to keep your comment as brief as possible"},{"line_number":396,"context_line":"   while still being descriptive."},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"The generated file will look something like this::"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":" \"\"\"Add column foo to bar table"},{"line_number":401,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_a16b60ec","line":398,"range":{"start_line":398,"start_character":48,"end_line":398,"end_character":50},"in_reply_to":"3f79a3b5_3ebd2db2","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":419,"context_line":"     pass"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":""},{"line_number":422,"context_line":" def downgrade():"},{"line_number":423,"context_line":"     pass"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"The top of the file is the docstring that will show when you review your"},{"line_number":426,"context_line":"revision history. If we didn\u0027t include the **-m** comment when we ran the"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_7ec3a53b","line":423,"range":{"start_line":422,"start_character":0,"end_line":423,"end_character":9},"updated":"2018-11-14 16:28:50.000000000","message":"Based on our template, this is no longer the case, correct?","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":419,"context_line":"     pass"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":""},{"line_number":422,"context_line":" def downgrade():"},{"line_number":423,"context_line":"     pass"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"The top of the file is the docstring that will show when you review your"},{"line_number":426,"context_line":"revision history. If we didn\u0027t include the **-m** comment when we ran the"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_416fec60","line":423,"range":{"start_line":422,"start_character":0,"end_line":423,"end_character":9},"in_reply_to":"3f79a3b5_7ec3a53b","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":423,"context_line":"     pass"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"The top of the file is the docstring that will show when you review your"},{"line_number":426,"context_line":"revision history. If we didn\u0027t include the **-m** comment when we ran the"},{"line_number":427,"context_line":"`alembic revision` command, this would just contain \"empty message\". If you"},{"line_number":428,"context_line":"didn\u0027t specify the comment when creating the file, be sure to replace \"empty"},{"line_number":429,"context_line":"message\" with a brief comment describing the reason for the database change."}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_3ed20d00","line":426,"range":{"start_line":426,"start_character":24,"end_line":426,"end_character":30},"updated":"2018-11-14 16:28:50.000000000","message":"did not","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":423,"context_line":"     pass"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"The top of the file is the docstring that will show when you review your"},{"line_number":426,"context_line":"revision history. If we didn\u0027t include the **-m** comment when we ran the"},{"line_number":427,"context_line":"`alembic revision` command, this would just contain \"empty message\". If you"},{"line_number":428,"context_line":"didn\u0027t specify the comment when creating the file, be sure to replace \"empty"},{"line_number":429,"context_line":"message\" with a brief comment describing the reason for the database change."}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_0187b40c","line":426,"range":{"start_line":426,"start_character":24,"end_line":426,"end_character":30},"in_reply_to":"3f79a3b5_3ed20d00","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":425,"context_line":"The top of the file is the docstring that will show when you review your"},{"line_number":426,"context_line":"revision history. If we didn\u0027t include the **-m** comment when we ran the"},{"line_number":427,"context_line":"`alembic revision` command, this would just contain \"empty message\". If you"},{"line_number":428,"context_line":"didn\u0027t specify the comment when creating the file, be sure to replace \"empty"},{"line_number":429,"context_line":"message\" with a brief comment describing the reason for the database change."},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"Then you need to define the changes in the `upgrade()` and `downgrade()`"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_fefd7570","line":428,"range":{"start_line":428,"start_character":0,"end_line":428,"end_character":6},"updated":"2018-11-14 16:28:50.000000000","message":"did not","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":425,"context_line":"The top of the file is the docstring that will show when you review your"},{"line_number":426,"context_line":"revision history. If we didn\u0027t include the **-m** comment when we ran the"},{"line_number":427,"context_line":"`alembic revision` command, this would just contain \"empty message\". If you"},{"line_number":428,"context_line":"didn\u0027t specify the comment when creating the file, be sure to replace \"empty"},{"line_number":429,"context_line":"message\" with a brief comment describing the reason for the database change."},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"Then you need to define the changes in the `upgrade()` and `downgrade()`"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_c190dc44","line":428,"range":{"start_line":428,"start_character":0,"end_line":428,"end_character":6},"in_reply_to":"3f79a3b5_fefd7570","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":428,"context_line":"didn\u0027t specify the comment when creating the file, be sure to replace \"empty"},{"line_number":429,"context_line":"message\" with a brief comment describing the reason for the database change."},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"Then you need to define the changes in the `upgrade()` and `downgrade()`"},{"line_number":432,"context_line":"methods. The code used in these methods is basic SQLAlchemy code for creating"},{"line_number":433,"context_line":"and modifying tables. You can find examples of what this looks like, as well as"},{"line_number":434,"context_line":"more in-depth usage of Alembic in the `Alembic tutorial`_."}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_defc3973","line":431,"range":{"start_line":431,"start_character":55,"end_line":431,"end_character":72},"updated":"2018-11-14 16:28:50.000000000","message":"nix","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":428,"context_line":"didn\u0027t specify the comment when creating the file, be sure to replace \"empty"},{"line_number":429,"context_line":"message\" with a brief comment describing the reason for the database change."},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"Then you need to define the changes in the `upgrade()` and `downgrade()`"},{"line_number":432,"context_line":"methods. The code used in these methods is basic SQLAlchemy code for creating"},{"line_number":433,"context_line":"and modifying tables. You can find examples of what this looks like, as well as"},{"line_number":434,"context_line":"more in-depth usage of Alembic in the `Alembic tutorial`_."}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_819ae45e","line":431,"range":{"start_line":431,"start_character":55,"end_line":431,"end_character":72},"in_reply_to":"3f79a3b5_defc3973","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":431,"context_line":"Then you need to define the changes in the `upgrade()` and `downgrade()`"},{"line_number":432,"context_line":"methods. The code used in these methods is basic SQLAlchemy code for creating"},{"line_number":433,"context_line":"and modifying tables. You can find examples of what this looks like, as well as"},{"line_number":434,"context_line":"more in-depth usage of Alembic in the `Alembic tutorial`_."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"One other option when creating the revision is to add the **--autogenerate**"},{"line_number":437,"context_line":"parameter to the revision command. This assumes that you\u0027ve already updated the"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_3eebeda5","line":434,"range":{"start_line":434,"start_character":57,"end_line":434,"end_character":58},"updated":"2018-11-14 16:28:50.000000000","message":"Or just look at existing migration scripts in the project itself.","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":431,"context_line":"Then you need to define the changes in the `upgrade()` and `downgrade()`"},{"line_number":432,"context_line":"methods. The code used in these methods is basic SQLAlchemy code for creating"},{"line_number":433,"context_line":"and modifying tables. You can find examples of what this looks like, as well as"},{"line_number":434,"context_line":"more in-depth usage of Alembic in the `Alembic tutorial`_."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"One other option when creating the revision is to add the **--autogenerate**"},{"line_number":437,"context_line":"parameter to the revision command. This assumes that you\u0027ve already updated the"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_61e8e8a6","line":434,"range":{"start_line":434,"start_character":57,"end_line":434,"end_character":58},"in_reply_to":"3f79a3b5_3eebeda5","updated":"2018-11-14 17:19:40.000000000","message":"Since there is only the initial script, the tutorial provides a wider range of examples. But I\u0027ll update to suggest looking at existing code too.","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":434,"context_line":"more in-depth usage of Alembic in the `Alembic tutorial`_."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"One other option when creating the revision is to add the **--autogenerate**"},{"line_number":437,"context_line":"parameter to the revision command. This assumes that you\u0027ve already updated the"},{"line_number":438,"context_line":"SQLAlchemy models, and have a connection to the placement database condifgured."},{"line_number":439,"context_line":"When run with this option, the `upgrade()` and `downgrade()` methods of the"},{"line_number":440,"context_line":"revision file are filled in for you using alembic\u0027s comparing the schema"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_de31995a","line":437,"range":{"start_line":437,"start_character":54,"end_line":437,"end_character":59},"updated":"2018-11-14 16:28:50.000000000","message":"you have","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":434,"context_line":"more in-depth usage of Alembic in the `Alembic tutorial`_."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"One other option when creating the revision is to add the **--autogenerate**"},{"line_number":437,"context_line":"parameter to the revision command. This assumes that you\u0027ve already updated the"},{"line_number":438,"context_line":"SQLAlchemy models, and have a connection to the placement database condifgured."},{"line_number":439,"context_line":"When run with this option, the `upgrade()` and `downgrade()` methods of the"},{"line_number":440,"context_line":"revision file are filled in for you using alembic\u0027s comparing the schema"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_41404ca4","line":437,"range":{"start_line":437,"start_character":54,"end_line":437,"end_character":59},"in_reply_to":"3f79a3b5_de31995a","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":435,"context_line":""},{"line_number":436,"context_line":"One other option when creating the revision is to add the **--autogenerate**"},{"line_number":437,"context_line":"parameter to the revision command. This assumes that you\u0027ve already updated the"},{"line_number":438,"context_line":"SQLAlchemy models, and have a connection to the placement database condifgured."},{"line_number":439,"context_line":"When run with this option, the `upgrade()` and `downgrade()` methods of the"},{"line_number":440,"context_line":"revision file are filled in for you using alembic\u0027s comparing the schema"},{"line_number":441,"context_line":"described in your models.py script and the actual state of the database. You"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_1e1151af","line":438,"range":{"start_line":438,"start_character":67,"end_line":438,"end_character":78},"updated":"2018-11-14 16:28:50.000000000","message":"configured","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":435,"context_line":""},{"line_number":436,"context_line":"One other option when creating the revision is to add the **--autogenerate**"},{"line_number":437,"context_line":"parameter to the revision command. This assumes that you\u0027ve already updated the"},{"line_number":438,"context_line":"SQLAlchemy models, and have a connection to the placement database condifgured."},{"line_number":439,"context_line":"When run with this option, the `upgrade()` and `downgrade()` methods of the"},{"line_number":440,"context_line":"revision file are filled in for you using alembic\u0027s comparing the schema"},{"line_number":441,"context_line":"described in your models.py script and the actual state of the database. You"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_613d4828","line":438,"range":{"start_line":438,"start_character":67,"end_line":438,"end_character":78},"in_reply_to":"3f79a3b5_1e1151af","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":436,"context_line":"One other option when creating the revision is to add the **--autogenerate**"},{"line_number":437,"context_line":"parameter to the revision command. This assumes that you\u0027ve already updated the"},{"line_number":438,"context_line":"SQLAlchemy models, and have a connection to the placement database condifgured."},{"line_number":439,"context_line":"When run with this option, the `upgrade()` and `downgrade()` methods of the"},{"line_number":440,"context_line":"revision file are filled in for you using alembic\u0027s comparing the schema"},{"line_number":441,"context_line":"described in your models.py script and the actual state of the database. You"},{"line_number":442,"context_line":"should always verify the revision script to make sure it does just what you"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_be05bd6a","line":439,"range":{"start_line":439,"start_character":43,"end_line":439,"end_character":60},"updated":"2018-11-14 16:28:50.000000000","message":"nix","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"650b723f91cf355b4a0e4fc5aca9db7e17703ce4","unresolved":false,"context_lines":[{"line_number":436,"context_line":"One other option when creating the revision is to add the **--autogenerate**"},{"line_number":437,"context_line":"parameter to the revision command. This assumes that you\u0027ve already updated the"},{"line_number":438,"context_line":"SQLAlchemy models, and have a connection to the placement database condifgured."},{"line_number":439,"context_line":"When run with this option, the `upgrade()` and `downgrade()` methods of the"},{"line_number":440,"context_line":"revision file are filled in for you using alembic\u0027s comparing the schema"},{"line_number":441,"context_line":"described in your models.py script and the actual state of the database. You"},{"line_number":442,"context_line":"should always verify the revision script to make sure it does just what you"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_010c9494","line":439,"range":{"start_line":439,"start_character":43,"end_line":439,"end_character":60},"in_reply_to":"3f79a3b5_be05bd6a","updated":"2018-11-14 17:19:40.000000000","message":"Done","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1c99e04b3fb1d56e0e7f75b7c6175eeecec19175","unresolved":false,"context_lines":[{"line_number":439,"context_line":"When run with this option, the `upgrade()` and `downgrade()` methods of the"},{"line_number":440,"context_line":"revision file are filled in for you using alembic\u0027s comparing the schema"},{"line_number":441,"context_line":"described in your models.py script and the actual state of the database. You"},{"line_number":442,"context_line":"should always verify the revision script to make sure it does just what you"},{"line_number":443,"context_line":"intended, as there are some things that autogenerate cannot deduce. See"},{"line_number":444,"context_line":"`autogenerate limitations`_ for more detailed information."},{"line_number":445,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"3f79a3b5_3e19add1","line":442,"range":{"start_line":442,"start_character":14,"end_line":442,"end_character":20},"updated":"2018-11-14 16:28:50.000000000","message":"(via tests)","commit_id":"92a4505b43bbbb07c248955d46a3edc042f68228"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d3f2f15e3d015decb0d1eafa614bc0bcdc843c14","unresolved":false,"context_lines":[{"line_number":394,"context_line":"- **revision** is the alembic subcommand for creating a new revision file."},{"line_number":395,"context_line":"- The **-m** parameter specifies a brief comment explaining the change."},{"line_number":396,"context_line":"- The generated file from alembic will have a name consisting of a random hash"},{"line_number":397,"context_line":"   prefix, followed by an underscore, followed by your **-m** comment, and a"},{"line_number":398,"context_line":"   **.py** extension. So be sure to keep your comment as brief as possible"},{"line_number":399,"context_line":"   while still being descriptive."},{"line_number":400,"context_line":""}],"source_content_type":"text/x-rst","patch_set":20,"id":"3f79a3b5_69c8c64d","line":397,"range":{"start_line":397,"start_character":2,"end_line":397,"end_character":3},"updated":"2018-11-15 10:02:56.000000000","message":"nit: alignment, it messes up the formatting:\n\nhttp://logs.openstack.org/24/614024/20/check/openstack-tox-docs/c75b054/html/contributor/#database-schema-changes","commit_id":"bf450104222486e6f3a431cfd09579c26160e4d8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d3f2f15e3d015decb0d1eafa614bc0bcdc843c14","unresolved":false,"context_lines":[{"line_number":435,"context_line":"code looks like, as well as find more in-depth usage of Alembic in the `Alembic"},{"line_number":436,"context_line":"tutorial`_."},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"One other option when creating the revision is to add the **--autogenerate**"},{"line_number":439,"context_line":"parameter to the revision command. This assumes that you have already updated"},{"line_number":440,"context_line":"the SQLAlchemy models, and have a connection to the placement database"},{"line_number":441,"context_line":"configured.  When run with this option, the `upgrade()` method of the revision"}],"source_content_type":"text/x-rst","patch_set":20,"id":"3f79a3b5_c9fc7a73","line":438,"range":{"start_line":438,"start_character":58,"end_line":438,"end_character":76},"updated":"2018-11-15 10:02:56.000000000","message":"Use ``--autogenerate`` otherwise the -- turns into a -.","commit_id":"bf450104222486e6f3a431cfd09579c26160e4d8"}],"doc/source/usage/creating-database-revisions.rst":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f5d4385dbfbe631d1339278b62a38ba19d2a9c83","unresolved":false,"context_lines":[{"line_number":87,"context_line":"described in your models.py script and the actual state of the database. You"},{"line_number":88,"context_line":"should always verify the revision script to make sure it does just what you"},{"line_number":89,"context_line":"intended, as there are some things that autogenerate cannot deduce. See"},{"line_number":90,"context_line":"`autogenerate limitations`_ for more detailed information."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":".. _`Alembic tutorial`: https://alembic.zzzcomputing.com/en/latest/tutorial.html"},{"line_number":93,"context_line":".. _`autogenerate limitations`: https://alembic.zzzcomputing.com/en/latest/autogenerate.html#what-does-autogenerate-detect-and-what-does-it-not-detect"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3f79a3b5_8571a516","line":90,"updated":"2018-10-30 21:32:00.000000000","message":"thanks, i\u0027m filled with joy","commit_id":"0c645458f2f642a95df2754c5e35d9846fffb90c"}],"doc/source/usage/creating_database_revisions.rst":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"c9b70e9c7219281735958af74e04b4f3d74a1c87","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"At some point in every application\u0027s life it becomes necessary to change the structure of its database. Modifying the SQLAlchemy models (in placement/db/sqlachemy/models.py) is necessary for the application t"},{"line_number":22,"context_line":"o understand the new structure, but that won\u0027t change the actual underlying database. To do that, Placement uses `alembic` to run database migrations."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Alembic calls each change a **revision**. To create a migration with alembic, run the `alembic revision` command, specifying the location of the alembic config file. Alembic will then generate a new revision file with a unique file name, and place it in the `alembic/versions/` directory::"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"3f79a3b5_b6f51254","line":22,"updated":"2018-10-29 21:06:51.000000000","message":"wrap, and general formatting","commit_id":"8a7fa46c16437751ffd5bf4edc58c38ea3224578"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"c9b70e9c7219281735958af74e04b4f3d74a1c87","unresolved":false,"context_lines":[{"line_number":29,"context_line":"The file will look something like this::"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":" \"\"\"empty message"},{"line_number":32,"context_line":" "},{"line_number":33,"context_line":" Revision ID: dfb006498ad2"},{"line_number":34,"context_line":" Revises: 0378df171af3"},{"line_number":35,"context_line":" Create Date: 2018-10-29 20:02:58.290779"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3f79a3b5_f6ff0a32","line":32,"updated":"2018-10-29 21:06:51.000000000","message":"should we care?","commit_id":"8a7fa46c16437751ffd5bf4edc58c38ea3224578"}],"doc/source/usage/index.rst":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f5d4385dbfbe631d1339278b62a38ba19d2a9c83","unresolved":false,"context_lines":[{"line_number":34,"context_line":"   :hidden:"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"   provider-tree"},{"line_number":37,"context_line":"   creating-database-revisions"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3f79a3b5_0565954a","line":37,"updated":"2018-10-30 21:32:00.000000000","message":"You probably want this in the contributor docs, not usage","commit_id":"0c645458f2f642a95df2754c5e35d9846fffb90c"}]}
