postgresql: how to define a JSONB column with default value
That's the same as with any other default value:
create table amsterdam
(
id integer primary key,
payload jsonb not null default '{}'::jsonb
);
If you are altering an already existing table, then the syntax is as follows:
alter table TABLE add column COLUMN jsonb not null default '{}'::jsonb;