-- +migrate Up
ALTER TABLE `accounts`
ADD COLUMN `active_worktype_id` BIGINT UNSIGNED COMMENT 'アカウントで利用するデフォルトのWorkTypeID（Active WorktypeID）の内部ID' AFTER `secondary_admin_user_id`,
ADD CONSTRAINT active_worktype_id_fk FOREIGN KEY (active_worktype_id) REFERENCES worktypes(id) ON DELETE SET NULL;

-- +migrate Down
ALTER TABLE `accounts`
DROP FOREIGN KEY active_worktype_id_fk,
DROP COLUMN `active_worktype_id`;