Compare commits

...

2 Commits

Author SHA1 Message Date
CJ_Clippy 029849544c bump ver
ci / build (push) Has been cancelled Details
2024-08-01 11:33:53 -08:00
CJ_Clippy 0a1108b4a7 fix schema roles and rename 2024-08-01 11:33:36 -08:00
4 changed files with 22 additions and 21 deletions

View File

@ -13,6 +13,16 @@ jobs:
- uses: actions/checkout@v3
name: Check out code
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build futureporn/migrations
with:
image: futureporn/migrations
tags: latest
registry: gitea.futureporn.net
dockerfile: d.migrations.dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build futureporn/bot
with:
@ -23,15 +33,6 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build futureporn/migrations
with:
image: futureporn/migrations
tags: latest
registry: gitea.futureporn.net
dockerfile: d.migrations.dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build futureporn/capture

View File

@ -4,8 +4,8 @@ CREATE schema api;
-- authenticator is the role which can "impersonate" other users.
CREATE ROLE authenticator LOGIN NOINHERIT NOCREATEDB NOCREATEROLE NOSUPERUSER;
-- anonymous is the role assigned to anonymous web requests
CREATE ROLE anonymous NOLOGIN;
-- anon is the role assigned to anon web requests
CREATE ROLE anon NOLOGIN;
-- schema for @futureporn/capture and @futureporn/bot
CREATE TABLE api.discord_interactions (
@ -16,12 +16,12 @@ CREATE TABLE api.discord_interactions (
-- roles & permissions for our backend automation user
CREATE ROLE automation_user NOLOGIN;
GRANT automation_user TO authenticator;
GRANT usage ON SCHEMA api TO automation_user;
GRANT all ON api.discord_interactions TO automation_user;
CREATE ROLE automation NOLOGIN;
GRANT automation TO authenticator;
GRANT usage ON SCHEMA api TO automation;
GRANT all ON api.discord_interactions TO automation;
-- role & permissions for anonymous web user
CREATE ROLE anonymous_user NOLOGIN;
GRANT usage on schema api TO anonymous_user;
GRANT SELECT ON api.discord_interactions TO anonymous_user;
-- role & permissions for anon web user
CREATE ROLE anon NOLOGIN;
GRANT usage on schema api TO anon;
GRANT SELECT ON api.discord_interactions TO anon;

View File

@ -7,4 +7,4 @@ CREATE TABLE api.records (
);
-- roles & permissions for our backend automation user
GRANT all ON api.records TO automation_user;
GRANT all ON api.records TO automation;

View File

@ -1,7 +1,7 @@
{
"name": "@futureporn/migrations",
"type": "module",
"version": "0.0.2",
"version": "0.1.0",
"description": "",
"main": "index.js",
"scripts": {