# Useful Commands
# CORE
Import sql file to local database
psql -h 127.0.0.1 -U intersective practera_main < ./webroot/files/sqls/db.sql
Export local database to sql file
pg_dump -h 127.0.0.1 -U intersective --exclude-table=cake_sessions --exclude-table=core_user_action_logs practera_main > practera.sql
Check docker containers
docker ps
Enter the docker container on local
docker exec -it practera-web bash cd app # go into the app directory to run the following commands
Run migrations
# inside the docker container /app Console/cake Migrations.migration run all
Revert the last migration
# inside the docker container /app Console/cake Migrations.migration run down
Generate a new migration file
# inside the docker container /app Console/cake Migrations.migration generate
Start workers(queue) on local
# inside the docker container /app Console/cake resque startAll
Start email queue(send emails to MailTrap)
# inside the docker container /app Console/cake resque start —queue email