CREATE TABLE IF NOT EXISTS rate_overrides (
  hotel_id       UUID    NOT NULL REFERENCES hotels(id) ON DELETE CASCADE,
  category_id    TEXT    NOT NULL,
  date           DATE    NOT NULL,
  price          INTEGER NOT NULL,
  extra_person   INTEGER NOT NULL DEFAULT 0,
  min_nights     INTEGER NOT NULL DEFAULT 1,
  channel_prices JSONB   NOT NULL DEFAULT '{}',
  closed         BOOLEAN NOT NULL DEFAULT false,
  updated_at     TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  PRIMARY KEY (hotel_id, category_id, date)
);
