NRE in Postgres Table.readExistingAsync
using Marten 6.0.5, running Storage.Database.WriteMigrationFileAsync(fn);
- on the first run, it generates considerably large script that creates tables for documents among others
- on the subsequent run it fails with NRE as shown below:
the schema for this table is a regular Marten schema (as taken from the first migration script)
CREATE TABLE public.mt_doc_accesskeymodel (
id uuid NOT NULL,
data jsonb NOT NULL,
mt_last_modified timestamp with time zone NULL DEFAULT (transaction_timestamp()),
mt_version uuid NOT NULL DEFAULT (md5(random()::text || clock_timestamp()::text)::uuid),
mt_dotnet_type varchar NULL,
CONSTRAINT pkey_mt_doc_accesskeymodel_id PRIMARY KEY (id)
);
strange, but I altered the db user with "superadmin" and it doesn't occur anymore at this point
Not strange, Postresql quiet fails accessing the schema metadata when you don't have the prerequisite rights. Not a new problem:(
Should there be a different exception be thrown? I mean a NRE alludes a bug (here within Weasel) which isn't the case. Maybe wrap the NRE in custom exception that has a hint about PostgreSQL's behavior with missing rights.