Skip to content

Commit

Permalink
[C] revert Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff committed May 16, 2024
1 parent 1cbee76 commit be25611
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ clean-images:
# Requires argument `dbname` to specify the name of the new DB, usage: `make local-db dbname=my_db dbfile=mydb.sql`
# Requires argument `dbfile` to specify the name of the DB dump file to recreate, usage: `make local-db dbname=my_db dbfile=mydb.sql`
local-db:
cd db && docker exec --workdir / investigations-api_postgres_1 psql -U craft -d postgres -c "create database $(dbname);"
cd db && docker exec --workdir / investigations-api_postgres_1 psql -U craft -d $(dbname) -f $(dbfile)
cd db && docker exec --workdir / investigations-api-postgres-1 psql -U craft -c "create database $(dbname);"
cd db && docker exec --workdir / investigations-api-postgres-1 psql -U craft -d $(dbname) -f $(dbfile)
echo "\n\n\n\nDon't forget to update your docker-compose-local-db.yaml with the DB name: $(dbname)"

db-list:
cd db && docker exec --workdir / investigations-api_postgres_1 psql -U craft -d postgres -c "SELECT (pg_stat_file('base/'||oid ||'/PG_VERSION')).modification, datname FROM pg_database;"
cd db && docker exec --workdir / investigations-api-postgres-1 psql -U craft -c "SELECT (pg_stat_file('base/'||oid ||'/PG_VERSION')).modification, datname FROM pg_database;"

cloud-db-list:
curl https://us-central1-edc-prod-eef0.cloudfunctions.net/sql-helper/databases\?project\=investigations
Expand Down

0 comments on commit be25611

Please sign in to comment.