-- CHECKLABS restaurant POS seating + station routing update
-- Use this SQL ONLY if you are not running the Laravel migration.
-- If you run `php artisan migrate --force`, do not run this SQL as well.

ALTER TABLE `dining_tables`
    ADD COLUMN `seating_type` VARCHAR(20) NOT NULL DEFAULT 'open' AFTER `capacity`;

UPDATE `products` AS p
INNER JOIN `departments` AS d ON d.id = p.department_id
SET p.kitchen_station = 'Main Kitchen'
WHERE d.slug = 'restaurant'
  AND (p.kitchen_station IS NULL OR p.kitchen_station = '');
