Commit 57611b06 authored by Enriko Käsper's avatar Enriko Käsper

TEIS-1877: fix database sequence default privileges for APP user.

parent 085b16d3
......@@ -14,15 +14,16 @@
</changeSet>
<!-- NB! only SELECT, INSERT, UPDATE privileges are assigned by default, DELETE privilege has to be assigned explicitly on tables to app_user in application changesets -->
<changeSet author="enriko" id="2000-01-01.002.grant-public-schema-privileges" runOnChange="true">
<changeSet author="enriko" id="2000-01-01.002.grant-public-schema-privileges-v2" runOnChange="true">
<preConditions onFail="CONTINUE">
<changeLogPropertyDefined property="db_app_username"/>
</preConditions>
<sql>
GRANT USAGE ON SCHEMA public TO ${db_app_username};
GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA public TO ${db_app_username};
GRANT USAGE, SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO ${db_app_username};
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE ON TABLES TO ${db_app_username};
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT USAGE, SELECT ON SEQUENCES TO ${db_app_username};
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT USAGE, SELECT, UPDATE ON SEQUENCES TO ${db_app_username};
</sql>
</changeSet>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment