I’ve been there before.
To prevent problems, I have one collection that holds the current names of the active collections and the active date (to verify the correct collection).
For example, if you have to import a new collection monthly, you can have a collection that holds pertinent info on the names of your current databases in use (you can call it " dbInfo ," for example):

In the backend you have a jsw that holds the functions to read the active Database info
export async function getActiveRosterDb() { ... }
export async function getDbDate() { ... }
All the code throughout the site checks to get the name of the active collection (and active date) from the dbInfo collection through the functions in the jsw.
This way, you never have to change any code when you decide to change a particular collection or all of them.
So when I import the next month’s collection for a Roster (etc.), all I have to do is change the fields in the dbInfo collection and that’s all:

This way you can tinker with new collections without touching existing code.
So if you screw up a collection, instead of suffering through the way Wix handles all of that (poorly, no database tools to speak of), just make a new collection and change your “directory” collection.
This setup is good practice in any case.