text: 		DROP TABLE AC_UI_STREAMS ;
  		DROP TABLE AC_UI_STREAMS_PROPERTY ;
  	-- =================================================  
  	-- PACKAGE: UI  
  	-- COMPONENT : STREAMS
  	-- CREATE : 2020.03.03
  	-- UPDATE : 
  	-- =================================================	
  		
  		CREATE TABLE AC_UI_STREAMS (
  			CATEGORY_ID             INTEGER NOT NULL,
  			STREAM_ID               INTEGER NOT NULL,
  			NAME					VARCHAR2(255) NOT NULL, 
  		 	DISPLAY_NAME 			VARCHAR2(255) NOT NULL, 
  		 	DESCRIPTION             VARCHAR2(1000) ,
  		 	CREATION_DATE           DATE DEFAULT  SYSDATE NOT NULL,
  		  	MODIFIED_DATE           DATE DEFAULT  SYSDATE NOT NULL,
  		 	CONSTRAINT AC_UI_STREAMS_PK PRIMARY KEY (STREAM_ID)
  		);
  		
  		COMMENT ON TABLE "AC_UI_STREAMS"  IS '스트림 테이블';
  		COMMENT ON COLUMN "AC_UI_STREAMS"."BOARD_ID" IS '스트림 ID'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS"."NAME" IS '유일한 이름'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS"."DISPLAY_NAME" IS '화면 출력 이름'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS"."DESCRIPTION" IS '설명'; 	
  		COMMENT ON COLUMN "AC_UI_STREAMS"."CREATION_DATE" IS '생성일자'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS"."MODIFIED_DATE" IS '수정일자'; 
  		
  		
  		CREATE INDEX AC_UI_STREAMS_NAME_IDX ON AC_UI_STREAMS (NAME);
  		
  	    CREATE TABLE AC_UI_STREAMS_PROPERTY (
  		  STREAM_ID               INTEGER NOT NULL,
  		  PROPERTY_NAME          VARCHAR2(100)   NOT NULL,
  		  PROPERTY_VALUE         VARCHAR2(1024)  NOT NULL,
  		  CONSTRAINT AC_UI_STREAMS_PROPERTY_PK PRIMARY KEY (STREAM_ID, PROPERTY_NAME)
  		);	
  		COMMENT ON TABLE      "AC_UI_STREAMS_PROPERTY"  IS '스트림 프로퍼티 테이블';
  		COMMENT ON COLUMN "AC_UI_STREAMS_PROPERTY"."STREAM_ID" IS '스트림 ID'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS_PROPERTY"."PROPERTY_NAME" IS '프로퍼티 이름'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS_PROPERTY"."PROPERTY_VALUE" IS '프로퍼티 값'; 		
  		
  		CREATE TABLE AC_UI_STREAMS_THREAD (
  			THREAD_ID			INTEGER NOT NULL,
  		  	OBJECT_TYPE			INTEGER NOT NULL,
  		 	OBJECT_ID			INTEGER NOT NULL,
  		  	ROOT_MESSAGE_ID		INTEGER NOT NULL,
  		  	CREATION_DATE		TIMESTAMP DEFAULT SYSTIMESTAMP NOT NULL,
  		  	MODIFIED_DATE		TIMESTAMP DEFAULT SYSTIMESTAMP NOT NULL,
  		 	CONSTRAINT AC_UI_STREAMS_THREAD_PK PRIMARY KEY (THREAD_ID)
  		);
  
  		COMMENT ON TABLE "AC_UI_STREAMS_THREAD"  IS '게시물 스레드(토픽) 테이블';
  		COMMENT ON COLUMN "AC_UI_STREAMS_THREAD"."THREAD_ID" IS '게시물 스레드 ID'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS_THREAD"."OBJECT_TYPE" IS '게시물이 속하는 객체 유형'; 	
  		COMMENT ON COLUMN "AC_UI_STREAMS_THREAD"."OBJECT_ID" IS '게시물이 속하는 객체 ID'; 	
  		COMMENT ON COLUMN "AC_UI_STREAMS_THREAD"."ROOT_MESSAGE_ID" IS '최초 게시물 ID'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS_THREAD"."CREATION_DATE" IS '생성일자'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS_THREAD"."MODIFIED_DATE" IS '수정일자'; 
  		
  		
  		CREATE TABLE AC_UI_STREAMS_MESSAGE (
  			MESSAGE_ID			INTEGER NOT NULL,
  		    PARENT_MESSAGE_ID	INTEGER NOT NULL,
  		    THREAD_ID			INTEGER NOT NULL,
  		    OBJECT_TYPE			INTEGER NOT NULL,
  		    OBJECT_ID			INTEGER NOT NULL,
  		    USER_ID				INTEGER NOT NULL,
  		    KEYWORDS			VARCHAR2(255),
  		    SUBJECT				VARCHAR2(255),
  		    BODY					CLOB,
  		    CREATION_DATE		TIMESTAMP DEFAULT SYSTIMESTAMP NOT NULL,
  		    MODIFIED_DATE		TIMESTAMP DEFAULT SYSTIMESTAMP NOT NULL,
  		 	CONSTRAINT AC_UI_STREAMS_MESSAGE_PK PRIMARY KEY (MESSAGE_ID)
  		);
  
  		COMMENT ON TABLE "AC_UI_STREAMS_MESSAGE"  IS '게시물 테이블';
  		COMMENT ON COLUMN "AC_UI_STREAMS_MESSAGE"."MESSAGE_ID" IS '게시물 ID'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS_MESSAGE"."PARENT_MESSAGE_ID" IS '부모 게시물 ID'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS_MESSAGE"."THREAD_ID" IS '게시물 스레드 ID'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS_MESSAGE"."OBJECT_TYPE" IS '게시물이 속하는 객체 유형'; 	
  		COMMENT ON COLUMN "AC_UI_STREAMS_MESSAGE"."OBJECT_ID" IS '게시물이 속하는 객체 ID'; 	
  		COMMENT ON COLUMN "AC_UI_STREAMS_MESSAGE"."USER_ID" IS '게시자 ID'; 	
  		COMMENT ON COLUMN "AC_UI_STREAMS_MESSAGE"."SUBJECT" IS '제목'; 	
  		COMMENT ON COLUMN "AC_UI_STREAMS_MESSAGE"."BODY" IS '내용'; 	
  		COMMENT ON COLUMN "AC_UI_STREAMS_MESSAGE"."CREATION_DATE" IS '생성일자'; 
  		COMMENT ON COLUMN "AC_UI_STREAMS_MESSAGE"."MODIFIED_DATE" IS '수정일자'; 
  		
  		
  		CREATE INDEX AC_UI_STREAMS_MESSAGE_IDX_01 ON AC_UI_STREAMS_MESSAGE (THREAD_ID);
  		CREATE INDEX AC_UI_STREAMS_MESSAGE_IDX_02 ON AC_UI_STREAMS_MESSAGE (USER_ID);
  		CREATE INDEX AC_UI_STREAMS_MESSAGE_IDX_03 ON AC_UI_STREAMS_MESSAGE (PARENT_MESSAGE_ID);
  		CREATE INDEX AC_UI_STREAMS_MESSAGE_IDX_04 ON AC_UI_STREAMS_MESSAGE (OBJECT_TYPE, OBJECT_ID, MODIFIED_DATE);
  
  
  		