]> git.datanom.net - wpp.git/blame - db_create.py
rm test access
[wpp.git] / db_create.py
CommitLineData
047d4d29
MR
1#!flask/bin/python
2from migrate.versioning import api
3from config import SQLALCHEMY_DATABASE_URI
4from config import SQLALCHEMY_MIGRATE_REPO
5from app import db
6import os.path
7db.create_all()
8if not os.path.exists(SQLALCHEMY_MIGRATE_REPO):
9 api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository')
10 api.version_control(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO)
11else:
12 api.version_control(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO, api.version(SQLALCHEMY_MIGRATE_REPO))
This page took 0.060916 seconds and 5 git commands to generate.