From d0d284294275fd85dd68e73ed0ffbbe3b89d7d38 Mon Sep 17 00:00:00 2001 From: Rignchen Date: Wed, 10 Jul 2024 10:17:15 +0200 Subject: [PATCH] fix: allow esp to know who they are --- database/migration/deploy/2024-07-10.sql | 7 +++++++ database/migration/revert/2024-07-10.sql | 7 +++++++ database/migration/sqitch.plan | 1 + database/migration/verify/2024-07-10.sql | 7 +++++++ 4 files changed, 22 insertions(+) create mode 100644 database/migration/deploy/2024-07-10.sql create mode 100644 database/migration/revert/2024-07-10.sql create mode 100644 database/migration/verify/2024-07-10.sql diff --git a/database/migration/deploy/2024-07-10.sql b/database/migration/deploy/2024-07-10.sql new file mode 100644 index 0000000..1d61dac --- /dev/null +++ b/database/migration/deploy/2024-07-10.sql @@ -0,0 +1,7 @@ +-- Deploy climat-guardian:2024-07-10 to pg + +BEGIN; + + grant select on table api.esp to esp32; + +COMMIT; diff --git a/database/migration/revert/2024-07-10.sql b/database/migration/revert/2024-07-10.sql new file mode 100644 index 0000000..b36be81 --- /dev/null +++ b/database/migration/revert/2024-07-10.sql @@ -0,0 +1,7 @@ +-- Revert climat-guardian:2024-07-10 from pg + +BEGIN; + + revoke select on table api.esp from esp32; + +COMMIT; diff --git a/database/migration/sqitch.plan b/database/migration/sqitch.plan index 762eec8..5487716 100644 --- a/database/migration/sqitch.plan +++ b/database/migration/sqitch.plan @@ -8,3 +8,4 @@ data 2024-06-07T20:09:18Z Nils # Add table to store data user 2024-06-07T20:47:39Z Nils # create a user table to store every user and password esp 2024-06-26T08:20:01Z dylan # create a esp table to stove every esp data 2024-07-05 2024-07-05T08:58:10Z Nils # Grant user the ability to remove users +2024-07-10 2024-07-10T08:08:27Z Nils # Give the esp permission to know it's id diff --git a/database/migration/verify/2024-07-10.sql b/database/migration/verify/2024-07-10.sql new file mode 100644 index 0000000..3064812 --- /dev/null +++ b/database/migration/verify/2024-07-10.sql @@ -0,0 +1,7 @@ +-- Verify climat-guardian:2024-07-10 on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK;