UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

2 lines 610 B
import e from"../../../constants/constants.mjs";import t from"../../logger/index.mjs";const n=async(n,r,i)=>{let a=n.db.client.schema.createIndex(i.name).on(r).columns(i.columns);i.unique&&(a=a.unique()),await a.execute(),t.debug({message:`Operation of type 'add' ran on index '${i.name}' for table '${r}'`,scope:e.logScopes.migrations})},r=async(n,r,i)=>{await n.db.client.schema.dropIndex(i).ifExists().execute(),t.debug({message:`Operation of type 'remove' ran on index '${i}' for table '${r}'`,scope:e.logScopes.migrations})};export{n as addIndex,r as dropIndex}; //# sourceMappingURL=index-builder.mjs.map