upgrade of DROP CONSTRAINT
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Related dev. issue(s): https://github.com/tarantool/tarantool/issues/9112
Product: Tarantool
Since: 3.0
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_sql/sql_statements_and_clauses/#alter-table
SME: @ ImeevMA
Details
Now, instead of just ALTER TABLE table DROP CONSTRAINT constraint; we
have 8 operator variants:
- Statement to drop PRIMARY KEY, UNIQUE, tuple FOREIGN NEY or tuple
CHECK constraints:
ALTER TABLE tab_name DROP CONSTRAINT constr_name;
This statement cannot drop a constraint if constr_name matches
more than one constraint.
- Statement to drop field FOREIGN NEY or field CHECK constraints:
ALTER TABLE tab_name DROP CONSTRAINT field_name.constr_name;
This statement cannot drop a constraint if constr_name matches
more than one constraint for the field_name field.
- Statement to drop PRIMARY KEY constraint:
ALTER TABLE tab_name DROP CONSTRAINT constr_name PRIMARY KEY;
- Statement to drop UNIQUE constraint:
ALTER TABLE tab_name DROP CONSTRAINT constr_name UNIQUE;
- Statement to drop tuple FOREIGN KEY constraint:
ALTER TABLE tab_name DROP CONSTRAINT constr_name FOREIGN KEY;
- Statement to drop tuple CHECK constraint:
ALTER TABLE tab_name DROP CONSTRAINT constr_name CHECK;
- Statement to drop field FOREIGN KEY constraint:
ALTER TABLE tab_name DROP CONSTRAINT field_name.constr_name FOREIGN KEY;
- Statement to drop field CHECK constraint:
ALTER TABLE tab_name DROP CONSTRAINT field_name.constr_name CHECK;
Requested by @ ImeevMA in https://github.com/tarantool/tarantool/commit/263777dcdd49dd7c48d4b54d9f5996f7802d9837.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ALTER TABLE section in the linked Tarantool SQL reference, then compare its DROP CONSTRAINT syntax with the eight variants listed in this issue. Update that section to document the supported forms and their constraint-selection rules; done means all eight statements and ambiguity restrictions are accurately represented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- database, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100