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

CREATE TABLE PREFS_PROPERTY_VALUE
(
    PROPERTY_VALUE_ID NUMBER(10,0) NOT NULL,
    NODE_ID NUMBER(10,0),
    PROPERTY_NAME VARCHAR2(100),
    PROPERTY_VALUE VARCHAR2(254),
    CREATION_DATE TIMESTAMP,
    MODIFIED_DATE TIMESTAMP
);

ALTER TABLE PREFS_PROPERTY_VALUE
    ADD CONSTRAINT PREFS_PROPERTY_VALUE_PK
PRIMARY KEY (PROPERTY_VALUE_ID);






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

CREATE TABLE PREFS_NODE
(
    NODE_ID NUMBER(10,0) NOT NULL,
    PARENT_NODE_ID NUMBER(10,0),
    NODE_NAME VARCHAR2(100),
    NODE_TYPE NUMBER(5,0),
    FULL_PATH VARCHAR2(254),
    CREATION_DATE TIMESTAMP,
    MODIFIED_DATE TIMESTAMP
);

ALTER TABLE PREFS_NODE
    ADD CONSTRAINT PREFS_NODE_PK
PRIMARY KEY (NODE_ID);







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



