versions Package

034_havana Module

keystone.common.sql.migrate_repo.versions.034_havana.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.034_havana.upgrade(migrate_engine)[source]

035_add_compound_revoked_token_index Module

keystone.common.sql.migrate_repo.versions.035_add_compound_revoked_token_index.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.035_add_compound_revoked_token_index.upgrade(migrate_engine)[source]

036_token_drop_valid_index Module

keystone.common.sql.migrate_repo.versions.036_token_drop_valid_index.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.036_token_drop_valid_index.upgrade(migrate_engine)[source]

037_add_region_table Module

keystone.common.sql.migrate_repo.versions.037_add_region_table.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.037_add_region_table.upgrade(migrate_engine)[source]

038_add_assignment_table Module

keystone.common.sql.migrate_repo.versions.038_add_assignment_table.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.038_add_assignment_table.upgrade(migrate_engine)[source]

039_grant_to_assignment Module

keystone.common.sql.migrate_repo.versions.039_grant_to_assignment.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.039_grant_to_assignment.downgrade_assignment_table(meta, migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.039_grant_to_assignment.migrate_grant_table(meta, session, table_name)[source]
keystone.common.sql.migrate_repo.versions.039_grant_to_assignment.upgrade(migrate_engine)[source]

040_drop_grant_tables Module

keystone.common.sql.migrate_repo.versions.040_drop_grant_tables.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.040_drop_grant_tables.recreate_grant_tables(meta, migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.040_drop_grant_tables.upgrade(migrate_engine)[source]

041_add_remaining_uses_count_to_trusts Module

keystone.common.sql.migrate_repo.versions.041_add_remaining_uses_count_to_trusts.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.041_add_remaining_uses_count_to_trusts.downgrade_trust_table_with_column_drop(meta, migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.041_add_remaining_uses_count_to_trusts.upgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.041_add_remaining_uses_count_to_trusts.upgrade_trust_table(meta, migrate_engine)[source]

042_endpoint_enabled Module

Adds an enabled column to the endpoint table.

The enabled value for the endpoint table was stored in the extra column as part of a JSON string.

To upgrade, the enabled column is added with a default value of true, then we check all the extra JSON for disabled and set the value to false for those.

Downgrade is essentially the opposite – we update the JSON with "enabled": false for any endpoints that are disabled and drop the enabled column.

keystone.common.sql.migrate_repo.versions.042_endpoint_enabled.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.042_endpoint_enabled.upgrade(migrate_engine)[source]

043_fixup_region_description Module

Relax the uniqueness of description column in region table.

The region table has a dedicated column for the region description. This column originally was not nullable and had to be unique. So if a user wanted to create a region without sending a description in the request, they would experience an SQL error because the description column can’t be null for a region. This means that every region had to have a unique description.

To upgrade, we are going to transfer all the data from the existing region table to a temporary table, drop the original region table, and then finally rename the temporary table to the correct name.

There is no downgrade path as the original migration has been fixed to not include the unique constraint on description column.

keystone.common.sql.migrate_repo.versions.043_fixup_region_description.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.043_fixup_region_description.upgrade(migrate_engine)[source]

044_service_enabled Module

Adds an enabled column to the service table.

The enabled value for the service table was stored in the extra column as part of a JSON string.

To upgrade, the enabled column is added with a default value of true, then we check all the extra JSON for disabled and set the value to false for those.

Downgrade is essentially the opposite – we update the JSON with "enabled": false for any services that are disabled and drop the enabled column.

keystone.common.sql.migrate_repo.versions.044_service_enabled.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.044_service_enabled.upgrade(migrate_engine)[source]

045_placeholder Module

keystone.common.sql.migrate_repo.versions.045_placeholder.downgrade(migration_engine)[source]
keystone.common.sql.migrate_repo.versions.045_placeholder.upgrade(migrate_engine)[source]

046_placeholder Module

keystone.common.sql.migrate_repo.versions.046_placeholder.downgrade(migration_engine)[source]
keystone.common.sql.migrate_repo.versions.046_placeholder.upgrade(migrate_engine)[source]

047_placeholder Module

keystone.common.sql.migrate_repo.versions.047_placeholder.downgrade(migration_engine)[source]
keystone.common.sql.migrate_repo.versions.047_placeholder.upgrade(migrate_engine)[source]

048_placeholder Module

keystone.common.sql.migrate_repo.versions.048_placeholder.downgrade(migration_engine)[source]
keystone.common.sql.migrate_repo.versions.048_placeholder.upgrade(migrate_engine)[source]

049_placeholder Module

keystone.common.sql.migrate_repo.versions.049_placeholder.downgrade(migration_engine)[source]
keystone.common.sql.migrate_repo.versions.049_placeholder.upgrade(migrate_engine)[source]

050_fk_consistent_indexes Module

keystone.common.sql.migrate_repo.versions.050_fk_consistent_indexes.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.050_fk_consistent_indexes.upgrade(migrate_engine)[source]

051_add_id_mapping Module

keystone.common.sql.migrate_repo.versions.051_add_id_mapping.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.051_add_id_mapping.upgrade(migrate_engine)[source]

052_add_auth_url_to_region Module

keystone.common.sql.migrate_repo.versions.052_add_auth_url_to_region.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.052_add_auth_url_to_region.upgrade(migrate_engine)[source]

053_endpoint_to_region_association Module

Migrated the endpoint ‘region’ column to ‘region_id.

In addition to the rename, the new column is made a foreign key to the respective ‘region’ in the region table, ensuring that we auto-create any regions that are missing. Further, since the old region column was 255 chars, and the id column in the region table is 64 chars, the size of the id column in the region table is increased to match.

To Upgrade:

Region Table

Increase the size of the if column in the region table

Endpoint Table

  1. Add the endpoint region_id column, that is a foreign key to the region table

  2. For each endpoint
    1. Ensure there is matching region in region table, and if not, create it
    2. Assign the id to the region_id column
  3. Remove the column region

To Downgrade:

Endpoint Table

  1. Add back in the region column

  2. For each endpoint
    1. Copy the region_id column to the region column
  3. Remove the column region_id

Region Table

Decrease the size of the id column in the region table, making sure that we don’t get classing primary keys.

keystone.common.sql.migrate_repo.versions.053_endpoint_to_region_association.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.053_endpoint_to_region_association.upgrade(migrate_engine)[source]

054_add_actor_id_index Module

keystone.common.sql.migrate_repo.versions.054_add_actor_id_index.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.054_add_actor_id_index.upgrade(migrate_engine)[source]

055_add_indexes_to_token_table Module

Add indexes to user_id and trust_id columns for the token table.

keystone.common.sql.migrate_repo.versions.055_add_indexes_to_token_table.downgrade(migrate_engine)[source]
keystone.common.sql.migrate_repo.versions.055_add_indexes_to_token_table.upgrade(migrate_engine)[source]