Simon Bowie 8c83ef9666 start of database changes: rename 'examples' to 'books' | 2 years ago | |
---|---|---|
nginx-conf | 3 years ago | |
web | 2 years ago | |
.env.template | 3 years ago | |
.gitignore | 3 years ago | |
README.md | 3 years ago | |
docker-compose.prod.yml | 3 years ago | |
docker-compose.yml | 3 years ago |
To build the database run:
docker exec -it python python
from app import db, create_app, models
db.create_all(app=create_app())
For creating database and user:
CREATE DATABASE toolkit;
CREATE USER 'flask'@'%' IDENTIFIED BY '[PASSWORD]';
GRANT CREATE, INSERT, UPDATE, SELECT, DELETE ON toolkit.* TO 'flask'@'%';