DROP TABLE IF EXISTS city;

CREATE TABLE city
(
    id          bigserial PRIMARY KEY,
    create_time TIMESTAMP WITHOUT TIME ZONE,
    update_time TIMESTAMP WITHOUT TIME ZONE,
    name        varchar(100) DEFAULT ''  NOT NULL,
    province_id bigint       DEFAULT 0   NOT NULL
);

COMMENT ON TABLE city IS '城市表';

COMMENT ON COLUMN city.name IS '名称';
COMMENT ON COLUMN city.province_id IS '省id';
create unique index on city (name, province_id);
