ALTER TABLE `user` DROP COLUMN `permission`;
ALTER TABLE `user` ADD COLUMN  `level_id` BIGINT(11) NULL;
ALTER TABLE `user` ADD COLUMN  `department_id` BIGINT(11) NULL;

CREATE TABLE `department_management`(
    `id` BIGINT(11) AUTO_INCREMENT,
    `department_name` VARCHAR(50) NOT NULL,
    `department_description` VARCHAR(255) 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;

CREATE TABLE `user_level`(
    `id` BIGINT(11) AUTO_INCREMENT,
    `level_name` VARCHAR(50)  NOT NULL,
    `permission` INT NULL,
    `register_id` BIGINT(20) NOT NULL COMMENT 'register_id',
    `register_date` TIMESTAMP NULL COMMENT 'register_date',
    `modify_id` BIGINT(20) NOT NULL COMMENT 'modify_id',
    `modify_date` TIMESTAMP NULL COMMENT 'modify_date',
    `default_yn` VARCHAR (1) NOT NULL DEFAULT 'N',
    `basic_user` VARCHAR (1) NOT NULL DEFAULT 'N',
    PRIMARY KEY (`id`) USING btree
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

