-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from nautobot/main-data
Add load-mock-data command
- Loading branch information
Showing
5 changed files
with
27,931 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
export PGUSER="postgres" | ||
export PGDATABASE=$DB_NAME | ||
|
||
psql -c "DROP SCHEMA public CASCADE"; | ||
psql -c "CREATE SCHEMA public"; | ||
psql -c "GRANT ALL ON SCHEMA public TO postgres"; | ||
psql -c "GRANT ALL ON SCHEMA public TO public"; | ||
psql -c "GRANT ALL ON SCHEMA public TO ${DB_USER}"; | ||
|
||
export PGUSER=$DB_USER | ||
export PGPASSWORD=$DB_PASSWORD | ||
|
||
psql < {{ nautobot_root }}/templates/nautobot_backup.dump | ||
|
||
{{ nautobot_root }}/bin/nautobot-server migrate | ||
{{ nautobot_root }}/bin/nautobot-server invalidate all |
Oops, something went wrong.