repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
ac3be17
parent
4ddd1d0
author
Eric Bower
date
2024-10-29 04:12:36 +0000 UTC
chore(analytics): add indexes to table
2 files changed,  +5, -1
M Makefile
+2, -1
 1@@ -129,10 +129,11 @@ migrate:
 2 	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20240311_add_public_key_name.sql
 3 	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20240324_add_analytics_table.sql
 4 	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20240819_add_projects_blocked.sql
 5+	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20241028_add_analytics_indexes.sql
 6 .PHONY: migrate
 7 
 8 latest:
 9-	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20240819_add_projects_blocked.sql
10+	$(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20241028_add_analytics_indexes.sql
11 .PHONY: latest
12 
13 psql:
A sql/migrations/20241028_add_analytics_indexes.sql
+3, -0
1@@ -0,0 +1,3 @@
2+CREATE INDEX analytics_visits_created_at_date_idx ON analytics_visits (created_at);
3+CREATE INDEX analytics_visits_status_idx ON analytics_visits (status);
4+CREATE INDEX analytics_visits_user_id_idx ON analytics_visits (user_id);