Serial id lost after db push
Kounts opened this issue · 2 comments
Kounts commented
We have a production and staging environment, we pulled our production database, ran migrations on local environment and then pushed database on staging.
One table created by one of the migrations seems to have lost it serial id when pushed in staging (table is working in local).
Id is now id integer NOT NULL
and not id integer NOT NULL DEFAULT nextval('motorbike_contract_request_details_id_seq'::regclass)
as other ids.
Error is :
null value in column "id" violates not-null constraint
dmitry commented
What database do you have PostgreSQL?