-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
111 additions
and
111 deletions.
There are no files selected for viewing
222 changes: 111 additions & 111 deletions
222
migrations/1701696068699-notice-board-change-column-name.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}), | ||
); | ||
} | ||
} |