Skip to content

Commit

Permalink
modify/#66: modify miration files
Browse files Browse the repository at this point in the history
  • Loading branch information
hobiJeong committed Dec 13, 2023
1 parent 891a19f commit 7698b1c
Showing 1 changed file with 111 additions and 111 deletions.
222 changes: 111 additions & 111 deletions migrations/1701696068699-notice-board-change-column-name.ts
Original file line number Diff line number Diff line change
@@ -1,123 +1,123 @@
// import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';

// export class NoticeBoardChangeColumnName1701696068699
// implements MigrationInterface
// {
// public async up(queryRunner: QueryRunner): Promise<void> {
// await queryRunner.changeColumn(
// 'notice_board',
// 'allow_comment',
// new TableColumn({
// name: 'is_allow_comment',
// type: 'boolean',
// default: true,
// isNullable: false,
// comment: '댓글 허용 여부 (0: 비활성화, 1: 허용)',
// }),
// );
export class NoticeBoardChangeColumnName1701696068699
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.changeColumn(
'notice_board',
'allow_comment',
new TableColumn({
name: 'is_allow_comment',
type: 'boolean',
default: true,
isNullable: false,
comment: '댓글 허용 여부 (0: 비활성화, 1: 허용)',
}),
);

// await queryRunner.changeColumn(
// 'notice_board_comment',
// 'isAnonymous',
// new TableColumn({
// name: 'is_anonymous',
// type: 'tinyint',
// }),
// );
await queryRunner.changeColumn(
'notice_board_comment',
'isAnonymous',
new TableColumn({
name: 'is_anonymous',
type: 'tinyint',
}),
);

// await queryRunner.changeColumn(
// 'notice_board_reply_comment',
// 'isAnonymous',
// new TableColumn({
// name: 'is_anonymous',
// type: 'tinyint',
// }),
// );
await queryRunner.changeColumn(
'notice_board_reply_comment',
'isAnonymous',
new TableColumn({
name: 'is_anonymous',
type: 'tinyint',
}),
);

// await queryRunner.changeColumn(
// 'notice_board_history',
// 'allow_comment',
// new TableColumn({
// name: 'is_allow_comment',
// type: 'boolean',
// default: true,
// isNullable: false,
// comment: '댓글 허용 여부 (0: 비활성화, 1: 허용)',
// }),
// );
await queryRunner.changeColumn(
'notice_board_history',
'allow_comment',
new TableColumn({
name: 'is_allow_comment',
type: 'boolean',
default: true,
isNullable: false,
comment: '댓글 허용 여부 (0: 비활성화, 1: 허용)',
}),
);

// await queryRunner.changeColumn(
// 'notice_board_comment_history',
// 'isAnonymous',
// new TableColumn({
// name: 'is_anonymous',
// type: 'tinyint',
// }),
// );
await queryRunner.changeColumn(
'notice_board_comment_history',
'isAnonymous',
new TableColumn({
name: 'is_anonymous',
type: 'tinyint',
}),
);

// await queryRunner.changeColumn(
// 'notice_board_reply_comment_history',
// 'isAnonymous',
// new TableColumn({
// name: 'is_anonymous',
// type: 'tinyint',
// }),
// );
// }
await queryRunner.changeColumn(
'notice_board_reply_comment_history',
'isAnonymous',
new TableColumn({
name: 'is_anonymous',
type: 'tinyint',
}),
);
}

// public async down(queryRunner: QueryRunner): Promise<void> {
// await queryRunner.changeColumn(
// 'notice_board',
// 'is_allow_comment',
// new TableColumn({
// name: 'allow_comment',
// type: 'boolean',
// }),
// );
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.changeColumn(
'notice_board',
'is_allow_comment',
new TableColumn({
name: 'allow_comment',
type: 'boolean',
}),
);

// await queryRunner.changeColumn(
// 'notice_board_comment',
// 'is_anonymous',
// new TableColumn({
// name: 'isAnonymous',
// type: 'tinyint',
// }),
// );
await queryRunner.changeColumn(
'notice_board_comment',
'is_anonymous',
new TableColumn({
name: 'isAnonymous',
type: 'tinyint',
}),
);

// await queryRunner.changeColumn(
// 'notice_board_reply_comment',
// 'is_anonymous',
// new TableColumn({
// name: 'isAnonymous',
// type: 'tinyint',
// }),
// );
await queryRunner.changeColumn(
'notice_board_reply_comment',
'is_anonymous',
new TableColumn({
name: 'isAnonymous',
type: 'tinyint',
}),
);

// await queryRunner.changeColumn(
// 'notice_board_history',
// 'is_allow_comment',
// new TableColumn({
// name: 'allow_comment',
// type: 'boolean',
// }),
// );
await queryRunner.changeColumn(
'notice_board_history',
'is_allow_comment',
new TableColumn({
name: 'allow_comment',
type: 'boolean',
}),
);

// await queryRunner.changeColumn(
// 'notice_board_comment_history',
// 'is_anonymous',
// new TableColumn({
// name: 'isAnonymous',
// type: 'tinyint',
// }),
// );
await queryRunner.changeColumn(
'notice_board_comment_history',
'is_anonymous',
new TableColumn({
name: 'isAnonymous',
type: 'tinyint',
}),
);

// await queryRunner.changeColumn(
// 'notice_board_reply_comment_history',
// 'is_anonymous',
// new TableColumn({
// name: 'isAnonymous',
// type: 'tinyint',
// }),
// );
// }
// }
await queryRunner.changeColumn(
'notice_board_reply_comment_history',
'is_anonymous',
new TableColumn({
name: 'isAnonymous',
type: 'tinyint',
}),
);
}
}

0 comments on commit 7698b1c

Please sign in to comment.