-- docker run --rm -p 20433:3306 -e MARIADB_DATABASE=test -e MARIADB_ROOT_PASSWORD=root mariadb:11.1.2
-- mysql -h 127.0.0.1 --port=20433 -u root -proot test < migrate.sql
CREATE TABLE items (
    id VARCHAR(20) NOT NULL,
    PRIMARY KEY (id)
);
CREATE TABLE sgs_data (
    id INT(11) NOT NULL AUTO_INCREMENT,
    Number varchar(15) NOT NULL DEFAULT '',
    PRIMARY KEY (id)
);
SET foreign_key_checks=0;
ALTER TABLE sgs_data
    CHANGE COLUMN `Number` itemId VARCHAR(20) NOT NULL,
    ADD CONSTRAINT fk_sgs_data_itemId FOREIGN KEY (itemId) REFERENCES items (id);
