I'd like to enforce a database schema in Firestore, a noSQL style database that does not require scheme by default.
So far, I've looked into using the Firebase Rules system as a possible avenue for schema enforcement: https://firebase.google.com/docs/firestore/security/rules-structure
I would like to:
Has anyone found a good way to enforce schema from the server side?
Firestore is not a relational database so the concept of a schema is not applicable [source Cloud Firestore Data model]. Data types in Firestore are enforced by firestore.rules
security rules.
In a relational database, the schema defines the tables, fields, relationships, views, indexes, packages, procedures, functions, queues, triggers, types, sequences, materialized views, synonyms, database links, directories, XML schemas, and other elements.
[Wikipedia]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With