]> Git — Sourcephile - gargantext.git/blob - devops/postgres/upgrade/0.0.5.7.7.sql
merge with dev
[gargantext.git] / devops / postgres / upgrade / 0.0.5.7.7.sql
1
2 ALTER TABLE nodes_contexts DROP CONSTRAINT nodes_contexts_pkey;
3 ALTER TABLE nodes_contexts ADD COLUMN id SERIAL PRIMARY KEY ;
4
5 CREATE TABLE public.nodescontexts_nodescontexts (
6 nodescontexts1 INTEGER NOT NULL REFERENCES public.nodes_contexts(id) ON DELETE CASCADE,
7 nodescontexts2 INTEGER NOT NULL REFERENCES public.nodes_contexts(id) ON DELETE CASCADE,
8
9 PRIMARY KEY (nodescontexts1, nodescontexts2)
10 );
11 ALTER TABLE public.nodescontexts_nodescontexts OWNER TO gargantua;
12
13 CREATE INDEX ON public.nodescontexts_nodescontexts USING btree (nodescontexts1, nodescontexts2)
14