-- liquibase formatted sql
-- changeset cyril:add_item_category

ALTER TABLE `items`
    ADD COLUMN `categoryId` INT NULL AFTER `type`,
    ADD INDEX `FK_ITEM_ON_CATEGORYID` (`categoryId` ASC) VISIBLE;
;
ALTER TABLE `items`
    ADD CONSTRAINT `FK_ITEM_ON_CATEGORYID`
        FOREIGN KEY (`categoryId`)
            REFERENCES `item_category` (`id`)
            ON DELETE RESTRICT
            ON UPDATE RESTRICT;
