diff --git a/migrations/2020-010_kit-memberships/down.sql b/migrations/2020-010_kit-memberships/down.sql index f6c33c8..4bc7e89 100644 --- a/migrations/2020-010_kit-memberships/down.sql +++ b/migrations/2020-010_kit-memberships/down.sql @@ -1 +1 @@ -DROP TABLE kit_memberships; +DROP TABLE kit_memberships diff --git a/migrations/2023-09-01-125329_dont-leak-media/down.sql b/migrations/2023-09-01-125329_dont-leak-media/down.sql index 786a323..167941a 100644 --- a/migrations/2023-09-01-125329_dont-leak-media/down.sql +++ b/migrations/2023-09-01-125329_dont-leak-media/down.sql @@ -6,5 +6,4 @@ ALTER TABLE media ALTER TABLE media ADD CONSTRAINT media_peripheral_id_fkey FOREIGN KEY (peripheral_id) REFERENCES peripherals (id) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT media_kit_id_fkey FOREIGN KEY (kit_id) REFERENCES kits (id) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT media_kit_configuration_id_fkey FOREIGN KEY (kit_configuration_id) REFERENCES kit_configurations (id) ON DELETE CASCADE ON UPDATE CASCADE; - + ADD CONSTRAINT media_kit_configuration_id_fkey FOREIGN KEY (kit_configuration_id) REFERENCES kit_configurations (id) ON DELETE CASCADE ON UPDATE CASCADE diff --git a/migrations/2023-09-01-125329_dont-leak-media/up.sql b/migrations/2023-09-01-125329_dont-leak-media/up.sql index e3d23b7..247edc4 100644 --- a/migrations/2023-09-01-125329_dont-leak-media/up.sql +++ b/migrations/2023-09-01-125329_dont-leak-media/up.sql @@ -8,5 +8,4 @@ ALTER TABLE media ALTER TABLE media ADD CONSTRAINT media_peripheral_id_fkey FOREIGN KEY (peripheral_id) REFERENCES peripherals (id) ON DELETE RESTRICT ON UPDATE CASCADE, ADD CONSTRAINT media_kit_id_fkey FOREIGN KEY (kit_id) REFERENCES kits (id) ON DELETE RESTRICT ON UPDATE CASCADE, - ADD CONSTRAINT media_kit_configuration_id_fkey FOREIGN KEY (kit_configuration_id) REFERENCES kit_configurations (id) ON DELETE RESTRICT ON UPDATE CASCADE; - + ADD CONSTRAINT media_kit_configuration_id_fkey FOREIGN KEY (kit_configuration_id) REFERENCES kit_configurations (id) ON DELETE RESTRICT ON UPDATE CASCADE diff --git a/migrations/2023-09-01-141454_add-queue-media-deletion/down.sql b/migrations/2023-09-01-141454_add-queue-media-deletion/down.sql index 76eecfa..6c02753 100644 --- a/migrations/2023-09-01-141454_add-queue-media-deletion/down.sql +++ b/migrations/2023-09-01-141454_add-queue-media-deletion/down.sql @@ -1 +1 @@ -DROP TABLE queue_media_pending_deletion; +DROP TABLE queue_media_pending_deletion diff --git a/migrations/2023-09-01-141454_add-queue-media-deletion/up.sql b/migrations/2023-09-01-141454_add-queue-media-deletion/up.sql index 6cdb2ee..ce97b4e 100644 --- a/migrations/2023-09-01-141454_add-queue-media-deletion/up.sql +++ b/migrations/2023-09-01-141454_add-queue-media-deletion/up.sql @@ -4,5 +4,4 @@ CREATE TABLE queue_media_pending_deletion ( media_id uuid NOT NULL UNIQUE, media_datetime timestamptz NOT NULL, media_size int8 NOT NULL, - CONSTRAINT media_size_positive CHECK ((media_size >= 0)) -); + CONSTRAINT media_size_positive CHECK ((media_size >= 0))) diff --git a/migrations/2024-03-15-155708_create-kit-last-seen/down.sql b/migrations/2024-03-15-155708_create-kit-last-seen/down.sql index 312bad2..b334006 100644 --- a/migrations/2024-03-15-155708_create-kit-last-seen/down.sql +++ b/migrations/2024-03-15-155708_create-kit-last-seen/down.sql @@ -1 +1 @@ -DROP TABLE kit_last_seen; +DROP TABLE kit_last_seen diff --git a/migrations/2024-03-15-155708_create-kit-last-seen/up.sql b/migrations/2024-03-15-155708_create-kit-last-seen/up.sql index d9b1682..2f0858a 100644 --- a/migrations/2024-03-15-155708_create-kit-last-seen/up.sql +++ b/migrations/2024-03-15-155708_create-kit-last-seen/up.sql @@ -8,4 +8,4 @@ CREATE INDEX ix_kit_last_seen_datetime_last_seen ON public.kit_last_seen USING b -- foreign keys ALTER TABLE public.kit_last_seen - ADD CONSTRAINT kit_last_seen_kit_id_fkey FOREIGN KEY (kit_id) REFERENCES kits (id) ON DELETE CASCADE ON UPDATE CASCADE; + ADD CONSTRAINT kit_last_seen_kit_id_fkey FOREIGN KEY (kit_id) REFERENCES kits (id) ON DELETE CASCADE ON UPDATE CASCADE diff --git a/migrations/2024-03-15-161913_populate-kit-last-seen/down.sql b/migrations/2024-03-15-161913_populate-kit-last-seen/down.sql index dd54a04..dd53bbc 100644 --- a/migrations/2024-03-15-161913_populate-kit-last-seen/down.sql +++ b/migrations/2024-03-15-161913_populate-kit-last-seen/down.sql @@ -1,2 +1,3 @@ -- no-op -SELECT 1; +SELECT + 1 diff --git a/migrations/2024-03-15-161913_populate-kit-last-seen/up.sql b/migrations/2024-03-15-161913_populate-kit-last-seen/up.sql index 355f823..f9121fe 100644 --- a/migrations/2024-03-15-161913_populate-kit-last-seen/up.sql +++ b/migrations/2024-03-15-161913_populate-kit-last-seen/up.sql @@ -7,4 +7,4 @@ FROM GROUP BY kit_id ON CONFLICT - DO NOTHING; + DO NOTHING diff --git a/migrations/2024-03-21-133127_add-kit-configuration-activation-timestamp/down.sql b/migrations/2024-03-21-133127_add-kit-configuration-activation-timestamp/down.sql index 7e9f152..15a686c 100644 --- a/migrations/2024-03-21-133127_add-kit-configuration-activation-timestamp/down.sql +++ b/migrations/2024-03-21-133127_add-kit-configuration-activation-timestamp/down.sql @@ -3,4 +3,4 @@ DROP TRIGGER kit_configurations_10_set_first_activated_at ON kit_configurations; DROP FUNCTION kit_configurations_set_first_activated_at; ALTER TABLE kit_configurations - DROP COLUMN first_activated_at; + DROP COLUMN first_activated_at diff --git a/migrations/2024-03-21-133127_add-kit-configuration-activation-timestamp/up.sql b/migrations/2024-03-21-133127_add-kit-configuration-activation-timestamp/up.sql index 215f0b5..2c3ccea 100644 --- a/migrations/2024-03-21-133127_add-kit-configuration-activation-timestamp/up.sql +++ b/migrations/2024-03-21-133127_add-kit-configuration-activation-timestamp/up.sql @@ -42,4 +42,4 @@ FROM ( kit_configuration_id) AS m WHERE NOT kc.never_used - AND m.kit_configuration_id = kc.id; + AND m.kit_configuration_id = kc.id diff --git a/migrations/2024-03-21-154534_change-kit-configurations-never-used-to-generated/down.sql b/migrations/2024-03-21-154534_change-kit-configurations-never-used-to-generated/down.sql index 2a808ae..3c40a38 100644 --- a/migrations/2024-03-21-154534_change-kit-configurations-never-used-to-generated/down.sql +++ b/migrations/2024-03-21-154534_change-kit-configurations-never-used-to-generated/down.sql @@ -1,2 +1,3 @@ ALTER TABLE kit_configurations - ALTER COLUMN never_used DROP EXPRESSION; + ALTER COLUMN never_used + DROP EXPRESSION diff --git a/migrations/2024-03-21-154534_change-kit-configurations-never-used-to-generated/up.sql b/migrations/2024-03-21-154534_change-kit-configurations-never-used-to-generated/up.sql index 30d7fe8..d10a22b 100644 --- a/migrations/2024-03-21-154534_change-kit-configurations-never-used-to-generated/up.sql +++ b/migrations/2024-03-21-154534_change-kit-configurations-never-used-to-generated/up.sql @@ -3,4 +3,4 @@ -- column into a generated one in pg 14 ALTER TABLE kit_configurations DROP never_used, - ADD never_used bool NOT NULL GENERATED ALWAYS AS (first_activated_at IS NULL) STORED; + ADD never_used bool NOT NULL GENERATED ALWAYS AS (first_activated_at IS NULL) STORED diff --git a/migrations/2024-03-21-163750_add-kit-configurations-kits-users-timestamps/down.sql b/migrations/2024-03-21-163750_add-kit-configurations-kits-users-timestamps/down.sql index 365688e..4aadff0 100644 --- a/migrations/2024-03-21-163750_add-kit-configurations-kits-users-timestamps/down.sql +++ b/migrations/2024-03-21-163750_add-kit-configurations-kits-users-timestamps/down.sql @@ -16,4 +16,4 @@ ALTER TABLE kits ALTER TABLE users DROP COLUMN updated_at, - DROP COLUMN created_at; + DROP COLUMN created_at diff --git a/migrations/2024-03-21-163750_add-kit-configurations-kits-users-timestamps/up.sql b/migrations/2024-03-21-163750_add-kit-configurations-kits-users-timestamps/up.sql index 8508f26..f92d7cf 100644 --- a/migrations/2024-03-21-163750_add-kit-configurations-kits-users-timestamps/up.sql +++ b/migrations/2024-03-21-163750_add-kit-configurations-kits-users-timestamps/up.sql @@ -78,4 +78,4 @@ FROM ( GROUP BY user_id) AS m WHERE - m.user_id = id; + m.user_id = id