Commit 6e9a3233 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[DB] Schema Node_Cgrams_Cgrams

parent 7f48ce14
......@@ -60,18 +60,16 @@ CREATE TABLE public.node_ngrams (
);
ALTER TABLE public.node_ngrams OWNER TO gargantua;
CREATE TABLE public.node_node_ngrams_ngrams (
node1_id integer NOT NULL,
node2_id integer NOT NULL,
CREATE TABLE public.node_ngrams_ngrams (
node_id integer NOT NULL,
node_ngrams1_id integer NOT NULL,
node_ngrams2_id integer NOT NULL,
FOREIGN KEY (node1_id) REFERENCES public.nodes(id) ON DELETE CASCADE,
FOREIGN KEY (node2_id) REFERENCES public.nodes(id) ON DELETE CASCADE,
FOREIGN KEY (node_id) REFERENCES public.nodes(id) ON DELETE CASCADE,
FOREIGN KEY (node_ngrams1_id) REFERENCES public.node_ngrams(id) ON DELETE CASCADE,
FOREIGN KEY (node_ngrams2_id) REFERENCES public.node_ngrams(id) ON DELETE CASCADE,
PRIMARY KEY (node1_id, node2_id, node_ngrams1_id, node_ngrams2_id)
PRIMARY KEY (node_id, node_ngrams1_id, node_ngrams2_id)
);
ALTER TABLE public.node_node_ngrams_ngrams OWNER TO gargantua;
ALTER TABLE public.node_ngrams_ngrams OWNER TO gargantua;
--------------------------------------------------------------
--------------------------------------------------------------
......
......@@ -75,7 +75,7 @@ flowList :: FlowCmdM env err m
-> Map NgramsType [NgramsElement]
-> m ListId
flowList lId ngs = do
printDebug "listId flowList" lId
-- printDebug "listId flowList" lId
-- TODO save in database
_r <- listInsertDb lId toNodeNgramsW (Map.toList ngs)
-- printDebug "result " r
......
......@@ -32,7 +32,7 @@ Next Step benchmark:
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Gargantext.Database.Schema.Node_NodeNgrams_NodeNgrams
module Gargantext.Database.Schema.Node_NodeNgramsNodeNgrams
where
import Control.Lens.TH (makeLensesWith, abbreviatedFields)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment