• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Lone Star Media

Driven to help you succeed

QueryFailedError: relation “*” already exists

January 27, 2021 by Kevin Fricke Leave a Comment

I was getting this error when debugging a resent NestJS application. All of my Google searched turned up nothing. After a bit of poking around in pgAdmin I found that there was a duplicate record under the sequences directory.

I was getting the following error:

QueryFailedError: relation 'car_id_seq' already exists. 

I found two records, one for ‘car_id_seq’ and one for ‘car_id_seq1’. The only thing that I can imagine is that somewhere along the way that duplicate record (car_id_seq1) was entered and even though I dropped the car table, when NextJS restarted their was a conflict.

So, if you get a similar error, check your sequences list to remove any duplicates. Hopefully this saves someone some time 😀

Filed Under: Javascript, NestJS

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Search

Get started today

Don’t wait. Let us provide you with a hassle free estimate of what it will take to complete your project.

Save on Premium WordPress Hosting

WPEngine is the premium WordPress hosting platform and is based right here in Austin, TX. Click the link below when you signup to save!

Save 20% off your first payment

Lone Star Media works with businesses large and small. We help companies increase sales and build strong brands for many years to come. We have partnered with a number of companies in Austin and look forward to helping your business excel.

Search

Copyright © 2021 · Genesis Framework · WordPress · Log in