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

feat: endpoint to rename a table #175

Merged
merged 1 commit into from
Sep 5, 2022
Merged

Conversation

Namyalg
Copy link
Member

@Namyalg Namyalg commented Aug 30, 2022

Pull Request Template

Description

This PR adds an endpoint to rename a table.

A post request is made as

 curl -d "title=run4&previous=old-table-name&new=new-table-name" -X POST http://localhost:8080/gcbm/table/rename

As an example, to change turnover_parameter to new-turnover_parameter

curl -d "title=run4&previous=turnover_parameter&new=new_turnover_parameter" -X POST http://localhost:8080/gcbm/table/rename

Fixes #174

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

image

@Namyalg
Copy link
Member Author

Namyalg commented Aug 30, 2022

@SanjaySinghRajpoot @YashKandalkar @ankitaS11 @padmajabhol, this is an implementation of the change table name endpoint

Copy link
Contributor

@SanjaySinghRajpoot SanjaySinghRajpoot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!! Thanks for the changes.

@Namyalg
Copy link
Member Author

Namyalg commented Aug 30, 2022

Imo, this is iteration1, where we pass a single table, its old and new name.
Maybe passing the old and new names as a dictionary might be a better idea ? in the case when more than 1 table needs to be changed?
Need more insight on how it will be implemented in the frontend

@ankitaS11
Copy link
Contributor

Hi @Namyalg, this looks good for iteration 1.

@YashKandalkar
Copy link

LTGM! On the frontend we can have a Model open when a table name is clicked and the users can edit it's name. This way, only a single table name can be edited at a time.
For column (or attribute) names we'd need an endpoint which accepts a dictionary as discussed earlier.

@Namyalg Namyalg merged commit 95bb027 into moja-global:master Sep 5, 2022
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.

Endpoint to modify table names
4 participants