This is to prepare for having packages that contains multiple different plugins in the same file.
13 lines
397 B
TypeScript
13 lines
397 B
TypeScript
import { getTimestampPrefix, sanitizeMigrationName } from '@emigrate/plugin-tools';
|
|
import { type GenerateMigrationFunction } from '@emigrate/plugin-tools/types';
|
|
|
|
export const generateMigration: GenerateMigrationFunction = async (name) => {
|
|
return {
|
|
filename: `${getTimestampPrefix()}_${sanitizeMigrationName(name)}.js`,
|
|
content: `// ${name}
|
|
export default async () => {
|
|
|
|
};
|
|
`,
|
|
};
|
|
};
|