c2ab4a39d1
Since versions of heat can and will change, we do not want want them hard-coded in the DB setup script. Instead, use the Python import logic to determine the location of the module. This will use the local copy of heat (which is usually what you want) if run from the top level of the repository. Otherwise it will use the installed version, as determined by Python. Signed-off-by: Zane Bitter <zbitter@redhat.com>
15 lines
490 B
Python
Executable File
15 lines
490 B
Python
Executable File
#!/usr/bin/env python
|
|
from migrate.versioning.shell import main
|
|
import migrate.exceptions
|
|
|
|
if __name__ == '__main__':
|
|
import os.path
|
|
migrate_repo_path = os.path.join(os.path.dirname(__file__),
|
|
'migrate_repo')
|
|
|
|
try:
|
|
main(url='mysql://heat:heat@localhost/heat', debug='False',
|
|
repository=migrate_repo_path)
|
|
except migrate.exceptions.DatabaseAlreadyControlledError:
|
|
print 'Database already version controlled.'
|