UNPKG

@lucidcms/core

Version:

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

30 lines (29 loc) 986 B
import { ExternalMigrationFn } from "./types.mjs"; //#region src/libs/db/define-migration.d.ts /** * A typed helper for authoring external migration files. Migration files * registered via `config.migrations.sources` or the project `migrations/` * directory must default export the result of this helper. * * External migrations run after core migrations. `lucid_*` tables are internal * and modifying them is unsupported. * * @example * export default defineMigration(({ adapter }) => ({ * async up(db) { * await db.schema * .createTable("my_table") * .addColumn("id", adapter.getDataType("primary"), (col) => * adapter.primaryKeyColumnBuilder(col), * ) * .execute(); * }, * async down(db) { * await db.schema.dropTable("my_table").execute(); * }, * })); */ declare const defineMigration: (fn: ExternalMigrationFn) => ExternalMigrationFn; //#endregion export { defineMigration as default }; //# sourceMappingURL=define-migration.d.mts.map