CREATE TABLE aircrafts (
aircraft_code character(3) NOT NULL,
model text NOT NULL,
range integer NOT NULL,
CONSTRAINT aircrafts_range_check CHECK ((range > 0))
);
COMMENT ON TABLE aircrafts IS 'Самолеты';
COMMENT ON COLUMN aircrafts.aircraft_code IS 'Код самолета, IATA';
COMMENT ON COLUMN aircrafts.model IS 'Модель самолета';
COMMENT ON COLUMN aircrafts.range IS 'Максимальная дальность полета, км';