What is the schema attributes inside models in sails


The schema attribute defines whether or not to enforce the schema.

Come again?

Relational databases tend to have a predefined schema (including what type can be stored, what the name of the column is etcetera). Whatever you insert, fetch or update has to adhere to that schema. Mongo, redis etc don’t have that. You can just insert whatever makes you happy. By setting schema to true, you’re forcing waterline to apply the same rules to schema-less adapters.