comnpany to cm

This commit is contained in:
ctengiz
2024-06-14 17:19:38 +03:00
parent a28576960e
commit f54c5660ea
15 changed files with 50 additions and 74 deletions

View File

@@ -13,7 +13,7 @@ create table company (
constraint uq_company unique (clid, code)
);
CREATE TRIGGER zl_company before INSERT or UPDATE ON company
CREATE TRIGGER zl_company before INSERT or UPDATE ON cm
FOR EACH ROW EXECUTE FUNCTION zllog();
create table company_usr (
@@ -22,5 +22,5 @@ create table company_usr (
usr_id dmn_usrid,
constraint uq_company_usr unique (company_id, usr_id),
constraint fk_company_usr_company foreign key (company_id)
references company(id) on update cascade on delete cascade
references cm(id) on update cascade on delete cascade
);

View File

@@ -1 +1 @@
alter table company add tmpl jsonb;
alter table cm add tmpl jsonb;

View File

@@ -0,0 +1,12 @@
alter table public.cm
rename to cm;
alter table public.cm
rename column title to name;
alter table public.company_usr
rename to cm_usr;
alter table public.cm_usr
rename column company_id to cm_id;