-- migrate:up
CREATE TABLE
    shop (
        id int NOT NULL AUTO_INCREMENT,
        shop_id int DEFAULT NULL,
        platform_id int NOT NULL,
        shop_logo text DEFAULT NULL,
        description text DEFAULT NULL,
        shop_name varchar(255) DEFAULT NULL,
        code varchar(255) DEFAULT NULL,
        kode VARCHAR(50) DEFAULT NULL,
        so_name VARCHAR(50),
        address VARCHAR(150),
        phone VARCHAR(20),
        max_awb INT,
        warehouse VARCHAR(50),
        refresh_token varchar(255) DEFAULT NULL,
        access_token varchar(255) DEFAULT NULL,
        expire_in int DEFAULT NULL,
        created_at timestamp NULL DEFAULT CURRENT_TIMESTAMP,
        PRIMARY KEY (id),
        FOREIGN KEY (platform_id) REFERENCES platform (id) ON DELETE CASCADE
    ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci;

-- migrate:down
DROP TABLE IF EXISTS shop;