Merged PR 356: license_historyテーブルを消し込む

## 概要
[Task2456: license_historyテーブルを消し込む](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2456)

- 元PBI or タスクへのリンク(内容・目的などはそちらにあるはず)
- 何をどう変更したか、追加したライブラリなど
  - プロダクト バックログ項目 1226: 第五として、自アカウント内ユーザーにライセンスを割り当てたい
    にてライセンス割り当て履歴テーブル(license_allocation_history)を作成したのですが、過去にlicenses_historyという名で同様のテーブルを作成していることが判明しました。
  - 影響調査の結果、過去作成したlicenses_historyについては、使用していないことが分かったので、削除するよう対応を行いました。

- このPull Requestでの対象/対象外
  - すべて対象
- 影響範囲(他の機能にも影響があるか)
  - ソースコードgrepにより、licenses_historyテーブルを使用していないことを確認済

## レビューポイント
- 特にレビューしてほしい箇所
- 軽微なものや自明なものは記載不要
- 修正範囲が大きい場合などに記載
- 全体的にや仕様を満たしているか等は本当に必要な時のみ記載
  - 特にありません。

## UIの変更
- 特にありません。

## 動作確認状況
- 全ユニットテスト実施し正常に通ることを確認

## 補足
- 相談、参考資料などがあれば
This commit is contained in:
masaaki 2023-08-25 05:53:58 +00:00
parent 50a837efb9
commit e1693a7323
2 changed files with 16 additions and 20 deletions

View File

@ -0,0 +1,16 @@
-- +migrate Up
DROP TABLE IF EXISTS `licenses_history`;
-- +migrate Down
CREATE TABLE IF NOT EXISTS `licenses_history` (
`id` BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY COMMENT 'ライセンス履歴ID',
`user_id` BIGINT UNSIGNED NOT NULL COMMENT 'ユーザID',
`license_id` BIGINT UNSIGNED NOT NULL COMMENT 'ライセンスID',
`allocated` BOOLEAN NOT NULL COMMENT '割り当てたか',
`executed_at` TIMESTAMP NOT NULL COMMENT '実施日時',
`exchange_type` VARCHAR(255) NOT NULL COMMENT 'ライセンス切り替え種別(なし/トライアル→通常/紙→通常)',
`created_at` TIMESTAMP DEFAULT now() COMMENT '作成時刻',
`created_by` VARCHAR(255) COMMENT '作成者',
`updated_at` TIMESTAMP DEFAULT now() on UPDATE now() COMMENT '更新時刻',
`updated_by` VARCHAR(255) COMMENT '更新者'
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci;

View File

@ -97,26 +97,6 @@ export class License {
@JoinColumn({ name: 'allocated_user_id' }) @JoinColumn({ name: 'allocated_user_id' })
user?: User; user?: User;
} }
@Entity({ name: 'licenses_history' })
export class LicenseHistory {
@PrimaryGeneratedColumn()
id: number;
@Column()
user_id: number;
@Column()
license_id: number;
@Column()
allocated: boolean;
@Column()
executed_at: Date;
@Column()
exchange_type: string;
}
@Entity({ name: 'card_license_issue' }) @Entity({ name: 'card_license_issue' })
export class CardLicenseIssue { export class CardLicenseIssue {