50
Custom indexes in the schema
planned
D
Derrickmehaffy
Basically the ability to define indexes in a standard way via the schema file (and maybe in the future via the CTB)
module.exports = {
collectionName: 'user',
info: {
singularName: 'user',
pluralName: 'users',
displayName: 'User',
},
options: {},
pluginOptions: {
},
attributes: {
fullName: {
type: 'string',
min: 1,
required: true,
},
},
// experimental feature:
indexes: [
{
name: 'upload_folders_path_id_index', // this should be optional
columns: ['full_name'], // This should be the name of the attribute not the db column name
type: 'unique',
},
],
};
Robin Louis Van Komen
Is there any timeline for this?
We really need the feature, as we are currently manually maintaining our indexes, and they are overridden every time we do any schema changes.
Derrick Mehaffy
planned