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

bugfix: Fix a bug that caused output without specifying index name #2733

Merged
merged 2 commits into from
Jan 25, 2025

Conversation

Karibash
Copy link
Contributor

@Karibash Karibash commented Aug 1, 2024

close #3420

Fixed a bug that caused empty index names to be output when executing the introspect command with auto-generated index names.
This fix is necessary because the specification of the index name is mandatory.

export function index(name: string): IndexBuilderOn {
return new IndexBuilderOn(name, false);
}
export function uniqueIndex(name: string): IndexBuilderOn {
return new IndexBuilderOn(name, true);
}

@Karibash
Copy link
Contributor Author

Karibash commented Aug 9, 2024

@AndriiSherman
Would it be better to make the index names optional, as in pg-core?

export function index(name?: string): IndexBuilderOn {
return new IndexBuilderOn(false, name);
}

@Karibash
Copy link
Contributor Author

Karibash commented Nov 1, 2024

@AndriiSherman
I apologize for being persistent, but have you had a chance to look into this?
If you can provide any instructions, I will make the necessary corrections.

@AndriiSherman
Copy link
Member

Please fix conflicts and I'll merge this PR! thanks for your work!

@Karibash
Copy link
Contributor Author

fixed it

@AndriiSherman AndriiSherman changed the base branch from main to beta January 25, 2025 12:57
@AndriiSherman AndriiSherman merged commit efae52b into drizzle-team:beta Jan 25, 2025
6 of 7 checks passed
@Karibash Karibash deleted the bugfix/index-name branch January 25, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] If the index name is the same as the generated name, it will be empty and a type error will occur
2 participants