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',
},
],
};
Created by Derrick Mehaffy
March 13, 2023