Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serial id lost after db push #124

Open
Kounts opened this issue Feb 27, 2018 · 2 comments
Open

Serial id lost after db push #124

Kounts opened this issue Feb 27, 2018 · 2 comments
Assignees

Comments

@Kounts
Copy link

Kounts commented Feb 27, 2018

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
Copy link

dmitry commented Mar 11, 2018

What database do you have PostgreSQL?

@numbata
Copy link
Collaborator

numbata commented Mar 11, 2018

@dmitry yes, it was PostgreSQL, cause "nextval()" used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants