-- migrate:up
CREATE TABLE warehouse (
    warehouse_id INT AUTO_INCREMENT PRIMARY KEY,        -- ID unik untuk setiap gudang
    warehouse_name VARCHAR(255) NOT NULL,                -- Nama gudang
    location VARCHAR(255) NOT NULL,                      -- Lokasi gudang
    zipcode VARCHAR(20) NOT NULL,                        -- Kode pos/gudang
    capacity INT NOT NULL,                               -- Kapasitas gudang dalam unit
    status ENUM('ACTIVE', 'INACTIVE', 'MAINTENANCE') NOT NULL DEFAULT 'ACTIVE',  -- Status operasional gudang
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,      -- Waktu pembuatan data
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP  -- Waktu update data
);

INSERT INTO warehouse (warehouse_name, location, zipcode, capacity, status)
VALUES
('wiselie Sidoarjo Regency', 'Sidoarjo Regency', '61256', 1000, 'ACTIVE'),
('wiselie Tangerang City', 'Tangerang City', '15151', 1000, 'ACTIVE'),
('wiselie Makassar City', 'Makassar City', '90223', 1000, 'ACTIVE'),
('wiselie Denpasar City', 'Denpasar City', '80114', 1000, 'ACTIVE');

-- migrate:down
