-- ============================================================
-- Run this ONCE on your existing MASTER database to add
-- license expiry (duration) support to companies.
-- Safe to run even with existing companies - they will default
-- to NULL (= lifetime/no expiry) until you set a duration for
-- them from Edit License.
-- ============================================================
ALTER TABLE tenants
    ADD COLUMN IF NOT EXISTS license_expiry DATE NULL AFTER license_count;