Hi I'm trying to migrate my local Metabase H2 application database to production but would like to specify the destination schema so my "public" schema doesn't get flooded w/ Metabase tables.
I see that you can set the "database" via MB_DB_DBNAME environment variable but I'm limited to only the default 'postgres' database and would like to specify a schema instead. Is this possible?
Unfortunately I get errors during the server startup that relate to the migrations running on the "public" schema. For example:
INFOCREATE TABLE public.activity (
INFO id integer NOT NULL,
INFO topic character varying(32) NOT NULL,
INFO "timestamp" timestamp with time zone NOT NULL,
INFO user_id integer,
INFO model character varying(16),
INFO model_id integer,
INFO database_id integer,
INFO table_id integer,
INFO custom_id character varying(48),
INFO details text NOT NULL
INFO)]
....
ERRORCaused by: org.postgresql.util.PSQLException: ERROR: permission denied for schema public
.....
INFO2024-03-03 09:21:54,230 INFO metabase.core :: Metabase Shutting Down ...
I even set the Postgres role default searchpath to "metabase".
It seems like I got the configuration wrong somehow or that there are hard-coded references to the "public" schema in metabases's code or its dependencies.