text: create table category
  (
      id        bigint generated by default as identity,
      name      varchar(64) not null,
      parent_id bigint,
      primary key (id)
  );
  
  create table product
  (
      id                bigint generated by default as identity,
      currency          varchar(3)     not null,
      name              varchar(64)    not null,
      original_currency varchar(3)     not null,
      original_price    decimal(19, 2) not null,
      price             decimal(19, 2) not null,
      primary key (id)
  );
  
  create table product_category
  (
      product_id  bigint not null,
      category_id bigint not null
  );
  
  alter table category
      add constraint UK_46ccwnsi9409t36lurvtyljak unique (name);
  
  alter table product
      add constraint UK_jmivyxk9rmgysrmsqw15lqr5b unique (name);
  
  alter table category
      add constraint FK2y94svpmqttx80mshyny85wqr foreign key (parent_id) references category;
  
  alter table product_category
      add constraint FKkud35ls1d40wpjb5htpp14q4e foreign key (category_id) references category;
  
  alter table product_category
      add constraint FK2k3smhbruedlcrvu6clued06x foreign key (product_id) references product;
  