Search code examples
loopbackjsstrongloop

Does loopback provide indexing of DB as part of meta data?


I just want to know if we can define which columns to be indexed as part of model definition and loopback automatically creates them as part of auto migration.


Solution

  • Yes, you can specify indexes in the model definition file

    https://docs.strongloop.com/display/public/LB/Model+definition+JSON+file#ModeldefinitionJSONfile-Indexes