]> git.lizzy.rs Git - cheatdb.git/blobdiff - README.md
Update policy document
[cheatdb.git] / README.md
index c96fbf0f76ebcc80a9798e4f49f2357fab178c91..8dc588b70301e86ce5a146781a540461795b3b86 100644 (file)
--- a/README.md
+++ b/README.md
@@ -33,10 +33,32 @@ the current session:
 
 If you need to, reset the db like so:
 
-       python3 setup.py -d
+       python3 setup.py -t
 
 Then run the server:
 
        ./rundebug.py
 
 Then view in your web browser: http://localhost:5000/
+
+## How-tos
+
+### Start celery worker
+
+```sh
+FLASK_CONFIG=../config.cfg celery -A app.tasks.celery worker
+```
+
+### Create migration
+
+```sh
+# if sqlite
+python setup.py -t
+rm db.sqlite && python setup.py -t && FLASK_CONFIG=../config.cfg FLASK_APP=app/__init__.py flask db stamp head
+
+# Create migration
+FLASK_CONFIG=../config.cfg FLASK_APP=app/__init__.py flask db migrate
+
+# Run migration
+FLASK_CONFIG=../config.cfg FLASK_APP=app/__init__.py flask db migrate
+```