#5112·go-zero

Error while GenerateModel with table has sequence without suffix seq

Author: longbui98Created Aug 23, 2025Updated Sep 10, 2026
Labelsstale

Hi team,

While working with library, I have seen that in case of creating table in PostgreSQL with sequence without suffix seq. EX:

Image

Then, when we run code to generate model in PostgreSQL, we have an error is related to parse error as below:

Image

The reason for above error is related to parse default value it is "nextval('gr_site_test_info_id'" in generate.go at line 244 as below. While, the default value must not be like that: Image

So, in the source code, I have seen that it pass value when the seq must be followed format as below: Image

So, I would like to request team to double check again about this issue from your side to verify whether we need to check format must be suffix that includes seq or not

Thanks in advance. !!