-- +migrate Up
CREATE TABLE IF NOT EXISTS `job_number` (
	`id` BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY COMMENT 'ID',
	`account_id` BIGINT UNSIGNED NOT NULL COMMENT 'アカウントID',
	`job_number` VARCHAR(10) NOT NULL COMMENT 'JOBナンバー',
	`updated_at` TIMESTAMP DEFAULT now() COMMENT '更新時刻',
	CONSTRAINT `unique_account_id` UNIQUE (`account_id`),
    CONSTRAINT `fk_account_id` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`),
    INDEX `idx_account_id` (`account_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci;

-- +migrate Down
DROP TABLE `job_number`;