Currently, when a user tries to rename a file to new_name, we check to see if any like resources (a Model, Metrics View, etc.) named new_name already exist. If so, we reject the file name change. One problem with this logic is that it prevents a file rename from model.sql to model.yaml.
This PR changes the logic so that we reject name changes only if the file name already exists in the given directory. This behavior matches that of a typical code editor.
Currently, when a user tries to rename a file to
new_name
, we check to see if any like resources (a Model, Metrics View, etc.) namednew_name
already exist. If so, we reject the file name change. One problem with this logic is that it prevents a file rename frommodel.sql
tomodel.yaml
.This PR changes the logic so that we reject name changes only if the file name already exists in the given directory. This behavior matches that of a typical code editor.
Closes https://github.com/rilldata/rill/issues/5961