Skip to content

Conversation

codereverser
Copy link

@codereverser codereverser commented Jul 16, 2023

On case sensitive migrations (i.e. with "quote identifiers"), reset sequences fail with the following error.

Database error 42703: column ""<columnName>"" of relation "<table>" does not exist

This is due to invalid parameters being passed to pg_get_serial_sequence function introduced in e32066d

for example, on a mysql table with following definition

CREATE TABLE botLog(
    `logID` bigint(20) NOT NULL AUTO_INCREMENT, 
    `message` varchar(255), 
    PRIMARY KEY (`logID`)
);
SELECT pg_get_serial_sequence(quote_ident('public') || '.' || quote_ident('botLog'), quote_ident('logID'));
ERROR:  column ""logID"" of relation "botLog" does not exist

throws the same error, but the following works

SELECT pg_get_serial_sequence(quote_ident('public') || '.' || quote_ident('botLog'), 'logID');
  pg_get_serial_sequence
---------------------------
 public."botLog_logID_seq"

ref: #425

@Asher-JH
Copy link

Asher-JH commented Oct 3, 2024

Is this something that can be merged in soon? facing this issue

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants