fixed premission problem after making migrations executed by go
All checks were successful
Tests / Run Go Tests (push) Successful in 1m44s
All checks were successful
Tests / Run Go Tests (push) Successful in 1m44s
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
ALTER DEFAULT PRIVILEGES FOR ROLE migrate
|
||||
IN SCHEMA public
|
||||
GRANT SELECT ON TABLES TO app_base;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES FOR ROLE migrate
|
||||
IN SCHEMA public
|
||||
GRANT USAGE, SELECT ON SEQUENCES TO app_base;
|
||||
|
||||
-- create "abwesenheit" table
|
||||
CREATE TABLE "abwesenheit" (
|
||||
"counter_id" bigserial NOT NULL,
|
||||
@@ -6,6 +14,7 @@ CREATE TABLE "abwesenheit" (
|
||||
"datum" timestamptz NULL DEFAULT (now())::date,
|
||||
PRIMARY KEY ("counter_id")
|
||||
);
|
||||
|
||||
-- create "anwesenheit" table
|
||||
CREATE TABLE "anwesenheit" (
|
||||
"counter_id" bigserial NOT NULL,
|
||||
@@ -55,3 +64,6 @@ CREATE TABLE "wochen_report" (
|
||||
PRIMARY KEY ("id"),
|
||||
CONSTRAINT "wochen_report_personal_nummer_woche_start_key" UNIQUE ("personal_nummer", "woche_start")
|
||||
);
|
||||
|
||||
GRANT INSERT, UPDATE ON abwesenheit, anwesenheit, wochen_report, user_password TO app_base;
|
||||
GRANT DELETE ON abwesenheit to app_base;
|
||||
|
||||
@@ -3,8 +3,3 @@
|
||||
DROP FUNCTION update_zuletzt_geandert;
|
||||
|
||||
DROP TRIGGER IF EXISTS pass_hash_update ON user_password;
|
||||
|
||||
|
||||
-- revert: Adds crypto extension
|
||||
|
||||
DROP EXTENSION IF EXISTS pgcrypto;
|
||||
|
||||
@@ -17,5 +17,3 @@ FOR EACH ROW
|
||||
EXECUTE FUNCTION update_zuletzt_geandert();
|
||||
|
||||
-- Adds crypto extension
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
|
||||
@@ -11,3 +11,5 @@ CREATE TABLE "s_feiertage" (
|
||||
);
|
||||
-- create index "feiertage_unique_pro_jahr" to table: "s_feiertage"
|
||||
CREATE UNIQUE INDEX "feiertage_unique_pro_jahr" ON "s_feiertage" ((EXTRACT(year FROM datum)), "name");
|
||||
|
||||
GRANT INSERT, UPDATE ON s_feiertage TO app_base;
|
||||
|
||||
Reference in New Issue
Block a user