Closed
Description
After #750, we should validate that MongoDB collection names are valid.
MongoDB rules are documented here: https://www.mongodb.com/docs/manual/reference/limits/#mongodb-limit-Restriction-on-Collection-Names
Let's simplify them to two rules:
- collection names should match regular expression
^[a-zA-Z_][a-zA-Z0-9_]{0,119}$
(that excludes non-latin letters, spaces, dots, dollars, dashes, long names, etc); - collection names can't start with a reserved prefix
_ferretdb_
.
We could relax those rules in the future.
- implement collection name validation on collection/table creation;
- add integration test;
- document the difference in rules in README.md;
- add diff dance test.
Tigris is not in scope.