-- migrate:up
CREATE TABLE resi (
    id INT AUTO_INCREMENT PRIMARY KEY,
    resi VARCHAR(50) NOT NULL UNIQUE,
    id_warehouse INT NOT NULL,
    scan_in DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    scan_out DATETIME,
    id_packer INT NULL,
    is_proses int DEFAULT '0',
    FOREIGN KEY (id_warehouse) REFERENCES warehouse(warehouse_id)
);

-- migrate:down
DROP TABLE IF EXISTS resi;