Add a script for breaking up records table into partitions

This commit is contained in:
Max Ignatenko 2024-02-19 19:05:50 +00:00
parent 8b86f8f929
commit 6b400b1f43
3 changed files with 63 additions and 2 deletions

View file

@ -1,9 +1,9 @@
.PHONY: all build up update down start-db status logs
.PHONY: all build up update down start-db status logs psql init-db
all:
go test -v ./...
.env: example.env
.env:
@cp example.env .env
@echo "Please edit .env to suit your environment before proceeding"
@exit 1
@ -30,3 +30,9 @@ logs:
psql:
@docker compose exec -it postgres psql -U postgres -d bluesky
init-db: init.sql
@docker compose up -d --build lister
@sleep 10
@docker compose stop lister
@cat init.sql | docker exec -i "$$(docker compose ps --format '{{.Names}}' postgres)" psql -U postgres -d bluesky