SQL source control creating new files with suffix for existing objects
Occasionally when we make minor changes to an existing database object SQL Source control deletes the existing .sql file from our source control and inserts a new one with a suffix (so, for function FunctionName, FunctionName.sql is removed from source control and a new file FunctionName1.sql is created).
We use SQL Server 2016 and SVN. Most of our checkins have been fine, the issue is only occurring occasionally. It's affected multiple databases, but so far only SQL functions particularly when permissions are added (which should just go in as an extra line on the bottom of the existing .sql file).
Any ideas on what might be causing this and how we should clean up the affected checkins? Source control is treating them as new files, so we are losing the continuous history for the affected objects.