
-----------------------------------------------------------------------------
-- PREFS_PROPERTY_VALUE
-----------------------------------------------------------------------------



CREATE TABLE PREFS_PROPERTY_VALUE
(
    PROPERTY_VALUE_ID INTEGER NOT NULL,
    NODE_ID INTEGER,
    PROPERTY_NAME VARCHAR(100),
    PROPERTY_VALUE VARCHAR(254),
    CREATION_DATE TIMESTAMP,
    MODIFIED_DATE TIMESTAMP,
    PRIMARY KEY (PROPERTY_VALUE_ID)
);




-----------------------------------------------------------------------------
-- PREFS_NODE
-----------------------------------------------------------------------------



CREATE TABLE PREFS_NODE
(
    NODE_ID INTEGER NOT NULL,
    PARENT_NODE_ID INTEGER,
    NODE_NAME VARCHAR(100),
    NODE_TYPE INT2,
    FULL_PATH VARCHAR(254),
    CREATION_DATE TIMESTAMP,
    MODIFIED_DATE TIMESTAMP,
    PRIMARY KEY (NODE_ID)
);




----------------------------------------------------------------------
-- PREFS_NODE                                                      
----------------------------------------------------------------------


----------------------------------------------------------------------
-- PREFS_PROPERTY_VALUE                                                      
----------------------------------------------------------------------

ALTER TABLE PREFS_NODE
    ADD CONSTRAINT FK_PREFS_NODE_1 FOREIGN KEY (PARENT_NODE_ID)
    REFERENCES PREFS_NODE (NODE_ID)
;
