From c2878dcd8548d8a9e63b1c27966700109a999916 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Tue, 18 Jun 2024 11:54:55 -0400 Subject: [PATCH] frontend_grants for both databases (#539) --- .../postgresql/027_v0_4_32_frontend_grants.sql | 15 +++++++++++++++ .../sql/sqlite3/027_v0_4_32_frontend_grants.sql | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 controller/store/sql/postgresql/027_v0_4_32_frontend_grants.sql create mode 100644 controller/store/sql/sqlite3/027_v0_4_32_frontend_grants.sql diff --git a/controller/store/sql/postgresql/027_v0_4_32_frontend_grants.sql b/controller/store/sql/postgresql/027_v0_4_32_frontend_grants.sql new file mode 100644 index 00000000..5b8afc41 --- /dev/null +++ b/controller/store/sql/postgresql/027_v0_4_32_frontend_grants.sql @@ -0,0 +1,15 @@ +-- +migrate Up + +create table frontend_grants ( + id serial primary key, + + account_id integer references accounts (id) not null, + frontend_id integer references frontends (id) not null, + + created_at timestamptz not null default(current_timestamp), + updated_at timestamptz not null default(current_timestamp), + deleted boolean not null default(false) +); + +create index frontend_grants_account_id_idx on frontend_grants (account_id); +create index frontend_grants_frontend_id_idx on frontend_grants (frontend_id); \ No newline at end of file diff --git a/controller/store/sql/sqlite3/027_v0_4_32_frontend_grants.sql b/controller/store/sql/sqlite3/027_v0_4_32_frontend_grants.sql new file mode 100644 index 00000000..29edee85 --- /dev/null +++ b/controller/store/sql/sqlite3/027_v0_4_32_frontend_grants.sql @@ -0,0 +1,15 @@ +-- +migrate Up + +create table frontend_grants ( + id integer primary key, + + account_id integer references accounts (id) not null, + frontend_id integer references frontends (id) not null, + + created_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')), + updated_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')), + deleted boolean not null default(false) +); + +create index frontend_grants_account_id_idx on frontend_grants (account_id); +create index frontend_grants_frontend_id_idx on frontend_grants (frontend_id); \ No newline at end of file