feat: DB업그레이드에서 기존 상태 검사와 확인 이력 등록 지원
미기록 항목의 실제 실행 조건을 읽기 전용으로 확인해 실행 불필요 상태를 구분한다. 명시적 요청에서 선행 항목부터 확인 이력을 등록하고 등록 버튼을 왼쪽에 배치한다. 부분 적용·게시판별 컬럼·조회 오류와 순차 등록·실패 이력·체크섬·잠금 보호 검증을 추가한다.
This commit is contained in:
1 parent
1da82df500
commit
545e6a504d
6 files changed
+262
-11
No files matched your search
+4
-4
@@ -34,13 +34,13 @@ if ($command === 'status') {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ($command !== 'migrate') {
|
||||
fwrite(STDERR, "사용법: php bin/db-migrate.php status | migrate [마이그레이션_ID]\n");
|
||||
if ($command !== 'migrate' && $command !== 'record-existing') {
|
||||
fwrite(STDERR, "사용법: php bin/db-migrate.php status | migrate [마이그레이션_ID] | record-existing\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
$target_id = isset($argv[2]) && $argv[2] !== '--all' ? $argv[2] : '';
|
||||
$result = g5_migration_run($target_id);
|
||||
$target_id = $command === 'migrate' && isset($argv[2]) && $argv[2] !== '--all' ? $argv[2] : '';
|
||||
$result = g5_migration_run($target_id, $command === 'record-existing');
|
||||
if (!$result['success']) {
|
||||
foreach ($result['errors'] as $error) {
|
||||
fwrite(STDERR, '[실패] ' . $error . "\n");
|
||||
|
||||
Reference in new issue
Block a user