Skip to content

Commit

Permalink
fix custom_seeds[network_prefixes] task during build package
Browse files Browse the repository at this point in the history
  • Loading branch information
senid231 committed Oct 31, 2023
1 parent e6383a4 commit 853792c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ docs: gems-test config/database.yml config/yeti_web.yml config/policy_roles.yml
db:create \
db:schema:load \
db:migrate \
db:seed \
custom_seeds[network_prefixes]
db:seed
RAILS_ENV=test $(bundle_bin) exec rake custom_seeds[network_prefixes]
$(info:msg=Generating documentation)
RAILS_ENV=test $(bundle_bin) exec rake docs:generate
RAILS_ENV=test $(bundle_bin) exec rake db:drop
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ role_policy:
And run command to create development database:
```sh
RAILS_ENV=development bundle exec rake db:create db:schema:load db:migrate db:seed custom_seeds[network_prefixes]
RAILS_ENV=development bundle exec rake db:create db:schema:load db:migrate db:seed
RAILS_ENV=development bundle exec rake custom_seeds[network_prefixes]
```

You can skip `custom_seeds[network_prefixes]` is you want to use your own network prefixes.
Expand All @@ -69,7 +70,8 @@ login `admin` and password `111111`
Then prepare test database(do not use db:test:prepare).

```sh
RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate db:seed custom_seeds[network_prefixes]
RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate db:seed
RAILS_ENV=test bundle exec rake custom_seeds[network_prefixes]
```

This project has CDR-database, configured as cdr
Expand Down Expand Up @@ -110,7 +112,8 @@ IGNORE_STOPS=true bundle exec rake db:migrate
## Migrations that insert rows into yeti database

```bash
RAILS_ENV=test bundle exec rake db:create db:schema:load db:seed custom_seeds[network_prefixes]
RAILS_ENV=test bundle exec rake db:create db:schema:load db:seed
RAILS_ENV=test bundle exec rake custom_seeds[network_prefixes]
# create migration inside db/migrations
RAILS_ENV=test bundle exec rake db:migrate
# SCHEMA_NAME - schema of table into which you've inserted row(s)
Expand Down

0 comments on commit 853792c

Please sign in to comment.