Much in the way Mongoose deals with schemas, I think it would be cool to see Wither handle document schemas in a way that's more natural with how documents are formatted within MongoDB itself, through either Diesel-style migrations using RON files in a migrations/[migration].ron kind of folder structure, or through macros.
An example RON file:
Users (
_id: {
type: String, // maybe as an enum of all supported types
},
username: {
type: String,
options: (
// some miscellaneous options for this field
required: true,
unique: true,
),
},
// can also declare objects
stats: {
blogs: { type: Number, options: (required: false, default: 0)},
},
createdAt: {
type: Date,
},
)
(issue migrated from #47 so as not to clutter that one)
Much in the way Mongoose deals with schemas, I think it would be cool to see Wither handle document schemas in a way that's more natural with how documents are formatted within MongoDB itself, through either Diesel-style migrations using RON files in a
migrations/[migration].ron
kind of folder structure, or through macros.An example RON file:
(issue migrated from #47 so as not to clutter that one)