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

Make index name mandatory on create index operation #59

Merged
merged 3 commits into from
Aug 18, 2023

Conversation

andrew-farries
Copy link
Collaborator

Make specifying a name mandatory on the Create index operation.

In order to work with indexes in subsequent migrations (eg deleting the index), the user will have to know the name of the migration. If the migration name is auto-generated and we ever change how names are generated, then we risk breaking a user's migrations if they have migrations that refer to these generated names.

@andrew-farries andrew-farries merged commit eacb929 into main Aug 18, 2023
3 checks passed
@andrew-farries andrew-farries deleted the mandatory-index-name branch August 18, 2023 07:55
andrew-farries added a commit that referenced this pull request Sep 14, 2023
Make it required to supply a name for the `CHECK` constraint when adding
one with the `set_check_constraint` operation.

It should be possible to drop constraints with a later migration (not
yet implemented), so requiring a name and not relying on automatic
generation of constraint names will make this easier.

The same thing was done for indexes in
#59
andrew-farries added a commit that referenced this pull request Sep 15, 2023
Make it required to supply a name for a foreign key constraint created
in either the `create_table`, `add_column` or `set_foreign_key`
operations.

It should be possible to drop constraints with a later migration (not
yet implemented), so requiring a name and not relying on automatic
generation of constraint names will make this easier.

The same thing was done for indexes in #59 and `CHECK` constraints in
#99.
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