Skip to content

Commit

Permalink
Merge branch 'develop' into feature/#5507-enable-add-manual-time
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-rocket committed Oct 25, 2024
2 parents c94d342 + c6c0984 commit fc85f4f
Show file tree
Hide file tree
Showing 3 changed files with 283 additions and 17 deletions.
3 changes: 2 additions & 1 deletion packages/core/src/database/migration-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ function queryParams(parameters: any[] | undefined): string {
*/
function getTemplate(connection: DataSource, name: string, timestamp: number, upSqls: string[], downSqls: string[]): string {
return `
import { Logger } from '@nestjs/common';
import { MigrationInterface, QueryRunner } from "typeorm";
import { yellow } from "chalk";
import { DatabaseTypeEnum } from "@gauzy/config";
Expand All @@ -279,7 +280,7 @@ export class ${camelCase(name, true)}${timestamp} implements MigrationInterface
* @param queryRunner
*/
public async up(queryRunner: QueryRunner): Promise<void> {
console.log(yellow(this.name + ' start running!'));
Logger.debug(yellow(this.name + ' start running!'), 'Migration');
switch (queryRunner.connection.options.type) {
case DatabaseTypeEnum.sqlite:
Expand Down
Loading

0 comments on commit fc85f4f

Please sign in to comment.