create table
public.loc_geo (
created_at timestamp with time zone not null default now(),
adress text null,
creator character varying not null,
created_by uuid null,
ru_name text not null,
site_adress text null,
area_price bigint null,
franchisee bigint null,
loc_id text not null,
loc_coordinates text null,
constraint locGeo_pkey primary key (loc_id),
constraint locGeo_area_price_fkey foreign key (area_price) references area_prices (price_id),
constraint locGeo_created_by_fkey foreign key (created_by) references auth.users (id) on delete set null,
constraint locGeo_creator_fkey foreign key (creator) references users_by_roles (email),
constraint locGeo_franchisee_fkey foreign key (franchisee) references franchise (id)
) tablespace pg_default;
create unique index locgeo_loc_id_text_idx on public.loc_geo using btree (loc_id) tablespace pg_default;