Skip to content

Commit

Permalink
docs: minor tweaks to README
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisen-san committed Dec 4, 2024
1 parent 8b830c0 commit 6ab0a6c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

prodder [![Build Status](https://travis-ci.org/enova/prodder.svg?branch=master)](https://travis-ci.org/enova/prodder)
=======
# Prodder

A tool to maintain and load your Rails application's database structure, seed
table contents, permissions and database settings based on its migration history
Expand Down Expand Up @@ -29,6 +28,7 @@ prior to enforcing foreign key constraints and if you want to develop in an envi
with the same permissions setup as production.

### Installation

In your Gemfile:

```ruby
Expand Down Expand Up @@ -74,6 +74,7 @@ bundle exec rake db:reset db:migrate
```

### Usage

Things that really matter:

1. `rake db:reset` recreates your database, loading `db/structure.sql`, `db/seeds.sql`,
Expand Down Expand Up @@ -205,13 +206,15 @@ store:
```

### Quality Checks

In some cases, such as foreign key dependencies and triggers, you may wish to defer
loading constraints on your tables until _after_ your seed data has been loaded.
`prodder` treats the presence of a `quality_check_file` key in the configuration
as an indication that it should split `structure_file` into those statements which
create the base structure, and put the constraints into the `quality_check_file`.

### Permissions

We have had multiple cases in the past with deployments failing because some role
cannot access something on prod. To fail early and catch these in development, it
would be easier to just have these permissions loaded in development environments.
Expand All @@ -221,10 +224,9 @@ must configure the 3 users as mentioned before in `#config/database.yml`.
```yaml
store:
structure_file: db/structure.sql # CREATE TABLE ...
quality_check_file: db/constraints.sql # ALTER TABLE ... ADD FOREIGN KEY ...
quality_check_file: db/quality_checks.sql # ALTER TABLE ... ADD FOREIGN KEY ...
```


### Example usage

The `-c` option to specify the configuration file is always required. All
Expand Down Expand Up @@ -254,12 +256,14 @@ $ prodder push -c prodder.yml
```
## TODO
* Log activity as it is performed.
* Support tracking a particular branch instead of master.
* Support specifying the options to pass to each pg_dump form.
* Select dumping only a subset of a seed table. (pg_dump won't do this ...)
## Previous Contributors
* [Kyle Hargraves](https://github.com/pd)
* [Sri Rangarajan](https://github.com/Slania)
* [Emmanuel Sambo](https://github.com/esambo)
Expand Down

0 comments on commit 6ab0a6c

Please sign in to comment.