sh db/setup.sh
sh db/setup_test_database.sh
Use 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.sh
bin/rails db:reset
bin/rails data_generators:generate_all
Start up the server in one terminal:
bin/rails server
In another terminal, run the script:
bin/rails simulate:app_activity
Or 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 # error
cd db
sh scrubbing/scrubber.sh
- Configure
pool_mode
to bestatement
in 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