create table town
(
    id   serial
        constraint table_name_pk
            primary key,
    name varchar,
    code varchar
);

create unique index town_id_uindex
    on town (id);