glance/glance/db/sqlalchemy
Hemanth Makkapati 21d431013f Port Glance Migrations to Alembic
This change proposes the use of Alembic to manage Glance migrations.
* Introduce new directory ``alembic_migrations`` under
  ``glance/db/sqlalchemy``. This directory is the home for all glance
  migrations henceforth. All the migration scripts reside under
  ``versions`` directory.
* All the migrations up to Liberty are consolidated into one migration
  called ``liberty_initial`` as those migrations are not supported
  any more. Mitaka migrations are retained but under a different naming
  convention.
* All the glance manage db commands are changed appropriately. They now
  use alembic to perform operations such as ``version``, ``upgrade``,
  ``sync`` and ``version_control``.
* The database versions are not numerical any more. They are the revision
  ID of the last migration applied on the database. Since we don't
  support migrations before Mitaka, the Liberty version ``42`` will now
  appear as ``liberty``. Migration ``43`` and ``44`` in Mitaka appear as
  ``mitaka01`` and ``mitaka02`` respectively.
* When one performs a ``sync`` or ``upgrade`` command, the database is
  first stamped with an equivalent alembic version before upgrading.
* The older migration scripts are retained so that users can correlate
  with the new migrations. Also, it is probably safe to retain them until
  the alembic migrations become stable. Similarly, the ``migrate_version``
  table is not removed yet.

Partially-Implements: blueprint alembic-migrations

Change-Id: Ie8594ff339a13bf190aefa308f54e97ee20ecfa2
Co-Authored-By: Alexander Bashmakov <alexander.bashmakov@intel.com>
Depends-On: I1596499529af249bc48dfe859bbd31e90c48a5e0
2017-01-31 22:42:43 -06:00
..
alembic_migrations Port Glance Migrations to Alembic 2017-01-31 22:42:43 -06:00
metadef_api Python 3: fix glance.tests.functional.db.test_sqlalchemy 2016-12-01 17:42:12 +01:00
migrate_repo Refine migration query added with CI change 2017-01-29 19:37:20 +00:00
__init__.py Create 'simple' db driver 2012-06-07 09:20:50 -07:00
api.py Fix regression introduced by Community Images 2017-01-20 22:37:28 +00:00
glare.py Python 3: fix glance.tests.functional.db.test_sqlalchemy 2016-12-01 17:42:12 +01:00
metadata.py Added overwrite warning for db_export_metadefs. 2016-11-08 16:46:49 +00:00
models.py Implement and Enable Community Images 2017-01-18 17:56:12 +00:00
models_glare.py Move Glance Artifact Repository API to separate endpoint 2016-02-10 18:34:55 +03:00
models_metadef.py Replace oslo_utils.timeutils 2015-12-10 10:53:46 +00:00