32
Ability to define custom indexes in the schema
planned
D
Derrickmehaffy
See Internal Notion RFC: https://www.notion.so/strapi/ContentType-Schema-indexes-f2cde81ff2d7442dbec1abfb318d302a
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',
},
],
};
Derrick Mehaffy
planned