-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Add column type targets to API #366
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mathemancer this looks great!
The only change I'd request is to add the column index to the ColumnSerializer
. In the current flow, when I looked at the list of columns, I couldn't figure out what the index was to get the PATCH
URL for the column detail view that I wanted to alter except by counting the list manually.
Please also resolve merge conflicts. |
@mathemancer I would just name the field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, please merge once you rename the serializer field.
Related to #201
This adds a property to the columns endpoint giving the valid target types to which the type of a given column can be altered. This is a list of DB-layer types in the
valid_target_types
field of a given column in the/api/v0/tables/<table_id>/columns/
endpoint (also available from a column detail view). The string representations listed can be fed directly as arguments to update a column type.Technical details
As a side benefit, this PR uses the
MathesarColumn
object as the representation of columns for viewing in the API. This gives more flexibility than using the rawColumn
type from SQLAlchemy.Screenshots
Checklist
Update index.md
).master
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin