- commit
- 1a63f59
- parent
- 351a5aa
- author
- Eric Bower
- date
- 2024-03-11 18:50:37 +0000 UTC
feat: add public_keys.name column
2 files changed,
+5,
-1
M
Makefile
+2,
-1
1@@ -118,10 +118,11 @@ migrate:
2 $(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20230921_add_tokens_table.sql
3 $(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20240120_add_payment_history.sql
4 $(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20240221_add_project_acl.sql
5+ $(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20240311_add_public_key_name.sql
6 .PHONY: migrate
7
8 latest:
9- $(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20240221_add_project_acl.sql
10+ $(DOCKER_CMD) exec -i $(DB_CONTAINER) psql -U $(PGUSER) -d $(PGDATABASE) < ./sql/migrations/20240311_add_public_key_name.sql
11 .PHONY: latest
12
13 psql:
1@@ -0,0 +1,3 @@
2+ALTER TABLE public_keys ADD COLUMN name varchar(256) NOT NULL DEFAULT '';
3+-- cannot add this because all names are empty
4+-- ALTER TABLE public_keys ADD CONSTRAINT unique_public_keys_user_name UNIQUE (user_id, name);