Comment 2 for bug 1396427

Revision history for this message
Edmond Kotowski (ekotowski) wrote :

It comes from the migration script 019_datastore_fix.py in the method create_legacy_version. This is why I thought the cleanest fix would be to add a migration scripts that sets the Active flag to false so it won't show up when you call datastore-list.

Here is the a snippet from the 019_datastore.py:
def create_legacy_version(datastores_table,
                          datastore_versions_table,
                          image_id):
    insert(
        table=datastores_table,
        values=dict(id=LEGACY_DATASTORE_ID, name="Legacy MySQL")
    ).execute()

    insert(
        table=datastore_versions_table,
        values=dict(id=LEGACY_VERSION_ID,
                    datastore_id=LEGACY_DATASTORE_ID,
                    name="Unknown Legacy Version",
                    image_id=image_id,
                    packages="",
                    active=False,
                    manager="mysql")
    ).execute()

    return LEGACY_VERSION_ID