Compare commits

..

No commits in common. "029849544cb1379fe5baf33aecb90a4fa0e520db" and "f1371970ac1ea7f0bbf591e3b8670cc74e7f5976" have entirely different histories.

4 changed files with 21 additions and 22 deletions

View File

@ -13,16 +13,6 @@ 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:
@ -33,6 +23,15 @@ 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;
-- anon is the role assigned to anon web requests
CREATE ROLE anon NOLOGIN;
-- anonymous is the role assigned to anonymous web requests
CREATE ROLE anonymous 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 NOLOGIN;
GRANT automation TO authenticator;
GRANT usage ON SCHEMA api TO automation;
GRANT all ON api.discord_interactions TO automation;
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;
-- 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;
-- 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;

View File

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

View File

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