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

Column dropping operation should use attnum #993

Closed
Tracked by #839
mathemancer opened this issue Jan 20, 2022 · 0 comments · Fixed by #1106 or #1132
Closed
Tracked by #839

Column dropping operation should use attnum #993

mathemancer opened this issue Jan 20, 2022 · 0 comments · Fixed by #1106 or #1132
Assignees
Labels
type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL

Comments

@mathemancer
Copy link
Contributor

Problem

Currently, the column dropping function uses the column index to identify columns. This is brittle, and we've decided to change to using the attnum property of columns instead.

Proposed solution

The function in db/columns/operations/drop.py should use attnum instead of column_index, and should properly use the table_oid, attnum pair to identify columns for its logic. Use the function get_column_name_from_attnum in the db.columns.operations.select module for this.

Additional context

We'll need to modify any place where the function is called as well.

@mathemancer mathemancer added type: enhancement New feature or request status: triage good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. help wanted Community contributors can implement this ready Ready for implementation work: backend Related to Python, Django, and simple SQL and removed status: triage labels Jan 20, 2022
@kgodey kgodey modified the milestones: [05.3] 2022-01 improvements, [08] Links between Tables, [07] Initial Data Types Jan 25, 2022
@silentninja silentninja self-assigned this Feb 17, 2022
@silentninja silentninja added status: started and removed ready Ready for implementation labels Feb 17, 2022
@kgodey kgodey removed good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. help wanted Community contributors can implement this labels Mar 1, 2022
@silentninja silentninja linked a pull request Mar 3, 2022 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL
Projects
No open projects
3 participants