mirror of
https://github.com/kennethreitz-archive/reflog.git
synced 2026-06-05 23:40:18 +00:00
migrate db
This commit is contained in:
@@ -10,9 +10,10 @@ This module contains the management functionality.
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from flaskext.script import Manager
|
||||
from clint.textui import puts, indent, colored
|
||||
from flaskext.script import Manager
|
||||
|
||||
from dashboard import app, g, redis_connect
|
||||
|
||||
@@ -43,6 +44,10 @@ def clear_db():
|
||||
puts('{0} deleted.'.format(colored.red(key)))
|
||||
|
||||
|
||||
@manager.command
|
||||
def migrate():
|
||||
os.system('./migrate.py')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
manager.run()
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from clint.textui import puts, colored, progress, indent
|
||||
|
||||
from dashboard import app, g, redis_connect
|
||||
app.test_request_context('/').push()
|
||||
|
||||
|
||||
redis = redis_connect()
|
||||
|
||||
|
||||
def main():
|
||||
print '\o/'
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user