Skip to content

Instantly share code, notes, and snippets.

@jbolda
Created April 13, 2015 21:31
Show Gist options
  • Save jbolda/7881eb1485e1db64a979 to your computer and use it in GitHub Desktop.
Save jbolda/7881eb1485e1db64a979 to your computer and use it in GitHub Desktop.
Use sqlite when local with Alembic
if os.environ.get('DATABASE_URL') is None:
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db') + '?check_same_thread=False'
else:
SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment