<?php
declare(strict_types=1);

return [
    'up' => "
        ALTER TABLE `suppliers`
            ADD COLUMN `total_orders`             INT UNSIGNED NOT NULL DEFAULT 0 AFTER `updated_by`,
            ADD COLUMN `on_time_delivery_count`   INT UNSIGNED NOT NULL DEFAULT 0 AFTER `total_orders`,
            ADD COLUMN `quality_acceptance_count`  INT UNSIGNED NOT NULL DEFAULT 0 AFTER `on_time_delivery_count`,
            ADD COLUMN `average_lead_days`         DECIMAL(5,1) NOT NULL DEFAULT 0.0 AFTER `quality_acceptance_count`,
            ADD COLUMN `last_order_date`           DATE NULL AFTER `average_lead_days`
    ",
    'down' => "
        ALTER TABLE `suppliers`
            DROP COLUMN `last_order_date`,
            DROP COLUMN `average_lead_days`,
            DROP COLUMN `quality_acceptance_count`,
            DROP COLUMN `on_time_delivery_count`,
            DROP COLUMN `total_orders`
    ",
];
