-- 필수 데이터 여부
ALTER TABLE `custom_field` ADD COLUMN  `required_data` VARCHAR(1) NOT NULL DEFAULT 'N';

-- url 항목 추가
ALTER TABLE `company_field` ADD COLUMN  `url` VARCHAR(255) NULL;
ALTER TABLE `isp_field` ADD COLUMN  `url` VARCHAR(255) NULL;
ALTER TABLE `hosting_field` ADD COLUMN  `url` VARCHAR(255) NULL;

ALTER TABLE `issue_company` ADD COLUMN  `url` VARCHAR(255) NULL;
ALTER TABLE `issue_isp` ADD COLUMN  `url` VARCHAR(255) NULL;
ALTER TABLE `issue_hosting` ADD COLUMN  `url` VARCHAR(255) NULL;

-- 자동 완료 상태 추가
ALTER TABLE `issue_type` ADD COLUMN  `complete_issue_status_id` BIGINT(20) NULL;

-- 업체의 url 컬럼 INDEX 추가
ALTER TABLE `company_field` ADD INDEX `urlIndex`(`url`);

ALTER TABLE `company_field` ADD COLUMN `isp_id` bigint(20) DEFAULT NULL;
ALTER TABLE `company_field` ADD COLUMN `hosting_id` bigint(20) DEFAULT NULL;

ALTER TABLE `company_field` ADD INDEX `ispIdIndex`(`isp_id`);
ALTER TABLE `company_field` ADD INDEX `hostingIdIndex`(`hosting_id`);

CREATE TABLE `email_template`(
    `id` BIGINT(11) AUTO_INCREMENT,
    `title` VARCHAR (255) NOT NULL,
    `template` mediumtext NOT NULL,
    `register_id` BIGINT(20) NOT NULL,
    `register_date` TIMESTAMP NULL,
    `modify_id` BIGINT(20) NOT NULL,
    `modify_date` TIMESTAMP NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;




