OMDSCloud/dictation_server/db/migrations/032-create_option_items.sql
makabe.t f43e0f779e Merged PR 373: DBマイグレーション
## 概要
[Task2515: DBマイグレーション](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2515)

- オプションアイテムのテーブルを追加するマイグレーションファイルを追加しました。

## レビューポイント
- カラム項目は適切か

## UIの変更
- なし

## 動作確認状況
- ローカルで確認
  - migrate up/down
2023-09-01 06:42:58 +00:00

15 lines
844 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- +migrate Up
CREATE TABLE IF NOT EXISTS `option_items` (
`id` BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY COMMENT 'オプションアイテムID',
`worktype_id` BIGINT UNSIGNED NOT NULL COMMENT 'worktypeの内部ID',
`item_label` VARCHAR(50) NOT NULL COMMENT 'アイテムラベル',
`default_value_type` VARCHAR(16) NOT NULL COMMENT 'デフォルト値種別Default/Blank/LastInput',
`initial_value` VARCHAR(50) NOT NULL COMMENT 'オプションアイテム初期値',
`created_by` VARCHAR(255) COMMENT '作成者',
`created_at` TIMESTAMP DEFAULT now() COMMENT '作成時刻',
`updated_by` VARCHAR(255) COMMENT '更新者',
`updated_at` TIMESTAMP DEFAULT now() on UPDATE now() COMMENT '更新時刻'
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci;
-- +migrate Down
DROP TABLE `option_items`;