
Add the ability to autogenerate migrations. Because we need to support different types of migration (expand and contract), this ends up being significantly more complicated than what was needed in nova and cinder and more akin to what was done in neutron. The key feature is here is the use of an alembic hook called 'process_revision_directives', which is called whenever one calls 'alembic revision --autogenerate'. We extend this to allow us to hook into the autogeneration process and ensure we only spit out directives for the relevant phase. While we're here, we open up the Bobcat DB branch. This is similar to what Neutron do (e.g. change I13ba740d245a46c41a969ff198e08ddff896eb1a). Documentation will follow. Change-Id: I17c9ff9508c5e2bd9521c18973af093d7550ab5a Signed-off-by: Stephen Finucane <stephenfin@redhat.com>