Once heat is installed, admin runs "heat-manage db_sync" command, which will run all migration scripts (in ./heat/db/sqlalchemy/migrate_repo/versions) upto HEAD version. This is very much suitable for the upgrades/downgrades of heat versions.
But on the fresh installation, the db schema can be created directly in sqlalchemy way, instead of running through these migration scripts, which will speedup the operation and schema will be generated in single run.
This bug is filed to address it.
To fix, we could use following snippet of the code:
from sqlalchemy.ext.declarative import declarative_base
#engine = <create the engine here>
declarative_base().metadata.create_all(engine).
#stamp with head version
How much time does that really save?
It seems like an unnecessary optimisation to me
Also don't the migrations save the current migration in the db?
So doing what you suggest will break that?