Skip to content

Incorrect complex indexes generation #3126

@PromanSEW

Description

@PromanSEW

Expected behavior

create table foo (id bigint generated by default as identity not null, bar bigint not null);
create index if not exists ix_foo_bar on foo (bar desc);

Actual behavior

create index if not exists ix_foo_bar desc on foo (bar desc);

Steps to reproduce

@Table(name = "foo", indexes = @Index(columnList = "bar desc"))
public class Foo extends Model {
	@Id
	public long id;
	@WhenCreated
	public long bar;
}
ERROR: syntax error at or near "desc" Position: XX [ERROR:0, SQLSTATE:42601], while trying to run this SQL script:
...
create index if not exists ix_foo_bar desc on foo (bar desc);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions