## 概要 [Task3848: アカウント退避テーブル作成](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3848) - アカウントテーブルと同様の構造をしたアカウント退避テーブルを作成 - ※差分: company_nameを削除、active_worktype_idの外部キー制約を削除 ## レビューポイント - 上記要素以外はaccountsテーブルの要素と同等であるか - 張られたインデックスに不足はないか - 想定と違う構造になっていないか ## 動作確認状況 - npm run migrate:up/downを実施 - EXPLAINでindexが機能していそうな事を確認 ``` EXPLAIN SELECT * FROM omds_ccb.accounts_archive where parent_account_id=1; --------------------------------------------------- # id, select_type, table, partitions, type, possible_keys, key, key_len, ref, rows, filtered, Extra '1', 'SIMPLE', 'accounts_archive', NULL, 'ref', 'idx_accounts_archive_parent_account_id', 'idx_accounts_archive_parent_account_id', '9', 'const', '1', '100.00', NULL ``` ``` EXPLAIN SELECT * FROM omds_ccb.accounts_archive where tier=2; --------------------------------------------------- # id, select_type, table, partitions, type, possible_keys, key, key_len, ref, rows, filtered, Extra '1', 'SIMPLE', 'accounts_archive', NULL, 'ref', 'idx_accounts_archive_tier', 'idx_accounts_archive_tier', '4', 'const', '2', '100.00', NULL ``` ``` EXPLAIN SELECT * FROM omds_ccb.accounts_archive where parent_account_id=1 AND tier=1; ---------------------------------------------------- # id, select_type, table, partitions, type, possible_keys, key, key_len, ref, rows, filtered, Extra '1', 'SIMPLE', 'accounts_archive', NULL, 'ref', 'idx_accounts_archive_parent_account_id,idx_accounts_archive_tier', 'idx_accounts_archive_parent_account_id', '9', 'const', '1', '50.00', 'Using where' ```
Description
No description provided
Languages
TypeScript
95.1%
HTML
1.9%
Shell
1.6%
SCSS
1.2%
Dockerfile
0.2%