Skip to content

Commit

Permalink
chore: update db dump (#1193)
Browse files Browse the repository at this point in the history
* chore: update db dump, clean-db.sh script, abd readme

* chore: update db dump with migrations
  • Loading branch information
1emu committed Aug 18, 2023
1 parent 8f83cb8 commit 9d303e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ You can create a DB from scratch, or you can use the `import-db.sh` script to cr
### Importing DB dump

```bash
bash scripts/import-db.sh USERNAME [DATABASE_NAME] [DUMP_FILE]
cd scripts/
bash ./import-db.sh USERNAME [DATABASE_NAME] [DUMP_FILE]
```

If no DATABASE_NAME and DUMP_FILE arguments are given, the script will use the default values and create a `governance` db using the `development.dump` dump.
Expand Down
4 changes: 4 additions & 0 deletions scripts/clean-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ DELETE FROM "public".jobs WHERE run_at < '$DATE';
DELETE FROM "public".proposals WHERE created_at < '$DATE';
SELECT count(*) FROM "public".proposals;
DELETE FROM "public".users;
DELETE FROM "public".unpublished_bids;
EOF
Binary file modified scripts/development.dump
Binary file not shown.

0 comments on commit 9d303e6

Please sign in to comment.