Skip to content

Latest commit

 

History

History
43 lines (40 loc) · 968 Bytes

README.md

File metadata and controls

43 lines (40 loc) · 968 Bytes

##Heroku logs

heroku logs --tail --app ybsapi

##Migrations

heroku run python manage.py db upgrade --app

##Exporting environment variables

export APP_SETTINGS="config.DevelopmentConfig"
export DATABASE_URL="postgresql://localhost/ybs"

##Database creation

sudo -u name_of_user createdb ybs #to create
psql -U name_of_user -d ybs #to check

##Database updates.

  1. Edit database schemas.
  2. Delete migrations folder.
  3. Remember to mkdir versions with ".keep" file
python3.7 manage.py db init
python3.7 manage.py db migrate
python3.7 manage.py db upgrade

##Heroku setup

heroku create name_of_your_application
heroku config:set APP_SETTINGS=config.ProductionConfig --remote prod
heroku config --app name_of_your_application
heroku run python manage.py db upgrade --app name_of_your_application # migrations

##Heroku logs

heroku logs --tail --app ybsapi

###VK verify user ID https://vk.com/dev/vk_apps_launch_params