hasura/graphql-engine

attempting to add a default value to a column used by a view results in an error

Open

#3224 aperta il 24 ott 2019

Vedi su GitHub
 (3 commenti) (0 reazioni) (1 assegnatario)TypeScript (2787 fork)batch import
a/data/postgresc/consolee/easyhelp wantedk/bugp/high

Metriche repository

Star
 (31.371 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Via the console, attempting to add a default value to a column which is used by a postgres view results in the following error:

Modifying Column Failed:
postgres-error: cannot alter type of a column used by a view or rule

Note, we are not changing the column type, we are simply adding a default value. Performing the same operation directly on the database works as expected.

i.e.

alter table "UserProfilePermissions" alter column "emailAddresses" set default 'false';

Guida contributor