sh db/setup.sh
sh db/setup_test_database.shUse the readwrite owner role for schema modifications.
This is not a superuser role, although it does have write capabilities.
The password is supplied from ~/.pgpass.
export DATABASE_URL="postgres://app:@localhost:5432/rideshare_development"The app user cannot TRUNCATE tables.
This is mostly useful for testing the "setup" automation. You wouldn't want to do this normally because you'd lose your data.
sh db/teardown.shbin/rails db:reset
bin/rails data_generators:generate_allStart up the server in one terminal:
bin/rails serverIn another terminal, run the script:
bin/rails simulate:app_activityOr run it with a iteration count, for example 2 or more:
bin/rails simulate:app_activity[2]Inspired by Issue #99 from @momer.
Using this configuration, Circle CI can use its configuration and run locally.
Currently there is this error: "invalid UTS mode"
brew install circleci
circleci local execute -c process.yml build # works
circleci local execute -c process.yml test # errorcd db
sh scrubbing/scrubber.sh- Configure
pool_modeto bestatementin the PgBouncer config file - Disable Query Logs (unfortunately) (
config/application.rb) - Make sure Prepared Statements aren't disabled in
config/database.yml - Connect through port 6432 and confirm prepared statements work correctly