--------------------------------------------------------------------------------
-- Drop Tables
--------------------------------------------------------------------------------

DROP TABLE IF EXISTS hotel_phone;
DROP TABLE IF EXISTS hotel;

--------------------------------------------------------------------------------
-- Create Tables
--------------------------------------------------------------------------------

CREATE TABLE hotel (
    hotel_id integer NOT NULL,
    name text NOT NULL,
    address text NOT NULL,
    year integer NOT NULL
);

ALTER TABLE hotel OWNER TO absent;

COMMENT ON TABLE hotel IS 'Hotel where guests can stay';


CREATE TABLE hotel_phone (
    hotel_id integer NOT NULL,
    sort integer NOT NULL,
    phone text NOT NULL,
    label text
);

ALTER TABLE hotel_phone OWNER TO absent;

COMMENT ON TABLE hotel_phone IS 'Phone numbers for a hotel';
