ordre sql
This commit is contained in:
39
postgresql-entrypoint-initdb.d/07_metabase.sql
Normal file
39
postgresql-entrypoint-initdb.d/07_metabase.sql
Normal file
@@ -0,0 +1,39 @@
|
||||
-- Metabase
|
||||
|
||||
create role metabase_user with
|
||||
login
|
||||
nosuperuser
|
||||
nocreatedb
|
||||
nocreaterole
|
||||
noinherit
|
||||
noreplication
|
||||
connection limit -1
|
||||
password 'supermotdepasse';
|
||||
|
||||
create database metabase with
|
||||
owner metabase_user;
|
||||
|
||||
grant connect
|
||||
on database sql
|
||||
to metabase_user;
|
||||
|
||||
grant usage
|
||||
on schema public
|
||||
to metabase_user;
|
||||
|
||||
grant select
|
||||
on table famille, article
|
||||
to metabase_user;
|
||||
|
||||
-- Pour toutes les tables du schéma public
|
||||
grant select
|
||||
on all tables
|
||||
in schema public
|
||||
to metabase_user;
|
||||
|
||||
-- Privilège par défaut pour que chaque nouvelle table créée dans public donnera automatiquement le droit SELECT à metabase.
|
||||
alter default privileges
|
||||
in schema public
|
||||
grant select
|
||||
on tables
|
||||
to metabase_user;
|
||||
Reference in New Issue
Block a user