Enforce non-null constraint on created_at column on audit_events
created_at
column should have non-null constraint enforced as it is used for partition.
gitlabhq_production=> \d audit_events;
Table "public.audit_events"
Column | Type | Collation | Nullable | Default
-------------+-----------------------------+-----------+----------+------------------------------------------
id | integer | | not null | nextval('audit_events_id_seq'::regclass)
author_id | integer | | not null |
type | character varying(255) | | not null |
entity_id | integer | | not null |
entity_type | character varying(255) | | not null |
details | text | | |
created_at | timestamp without time zone | | |
updated_at | timestamp without time zone | | |
ip_address | inet | | |
On staging, there is currently no record that do not have created_at
.
gitlabhq_production=> select count(*) from audit_events where created_at is NULL;
count
-------
0
(1 row)
Edited by Tan Le