MS SQL Server: Rename Relationships
An existing relationship can be renamed as follows:
Renaming Local Relationships
- Head to
Data -> [table-name] -> Relationshipsin the Console
- Click on the
Renameoption for the relationship in question.
- This will open up a pop-up widget which will allow you to rename and save the relationship
Renaming Remote Relationships
Remote relationships cannot be renamed. They have to dropped and created again with the new name.
You can rename a relationship by changing the relationship name in the
tables.yaml file inside the
- name: author
Apply the Metadata by running:
hasura metadata apply
You can rename a relationship by using the mssql_rename_relationship Metadata API:
POST /v1/metadata HTTP/1.1
You might not be allowed to drop a relationship if it has been referenced elsewhere (e.g. in a permissions rule).
In this case you will have to delete the references first, rename the relationship, and then re-add the references.