   CREATED_AT DATE NOT NULL,
   UPDATED_AT DATE,
   DELETED_AT DATE,
-  CONSTRAINT EVENTS_FILTER_ITEMS_PK PRIMARY KEY 
+  CONSTRAINT PK_EVENTS_FILTER_ITEMS PRIMARY KEY 
     (
       ITEM_ID 
     )
-  USING INDEX TABLESPACE INDX
-    TABLESPACE DATA
-  ENABLE 
-);
-
-CREATE SEQUENCE events_instance_seq
+  USING INDEX TABLESPACE INDX)
+    TABLESPACE DATA
+/
+
+COMMENT ON TABLE apismgr.EVENTS_FILTER_ITEMS IS 'Stores name of items that are contained in filters.';
+COMMENT ON COLUMN apismgr.EVENTS_FILTER_ITEMS.ITEM_ID IS 'Primary key.';
+COMMENT ON COLUMN apismgr.EVENTS_FILTER_ITEMS.FILTER_ID IS 'Foreign key for EVENTS_FILTERS table.';
+COMMENT ON COLUMN apismgr.EVENTS_FILTER_ITEMS.NAME IS 'Name of filter item.';
+COMMENT ON COLUMN apismgr.EVENTS_FILTER_ITEMS.CREATED_AT IS 'Stores SYSDATE when filter item was created.';
+COMMENT ON COLUMN apismgr.EVENTS_FILTER_ITEMS.UPDATED_AT IS 'Stores SYSDATE when filter item was updated.';
+COMMENT ON COLUMN apismgr.EVENTS_FILTER_ITEMS.DELETED_AT IS 'Stores SYSDATE when filter item was deleted.';
+
+CREATE SEQUENCE apismgr.events_instance_seq
   MINVALUE 1
   START WITH 1
   INCREMENT BY 1

CREATE TABLE EVENTS_EVENTS 
(
  EVENT_ID              VARCHAR2(36) NOT NULL,
  TITLE                 VARCHAR2(256) NOT NULL,

  CREATED_AT    DATE NOT NULL,
  UPDATED_AT    DATE,
  DELETED_AT    DATE,
  CONSTRAINT PK_EVENTS_DEPARTMENTS PRIMARY KEY 
    (
      DEPARTMENT_ID 
    )
  USING INDEX TABLESPACE INDX)
    TABLESPACE DATA
/

COMMENT ON TABLE apismgr.EVENTS_DEPARTMENTS IS 'Contains departments used in vendor calendar system.';
COMMENT ON COLUMN apismgr.EVENTS_DEPARTMENTS.DEPARTMENT_ID IS 'Primary key.';
COMMENT ON COLUMN apismgr.EVENTS_DEPARTMENTS.NAME IS 'Plain name of department.';
COMMENT ON COLUMN apismgr.EVENTS_DEPARTMENTS.PAGE_NAME IS 'URI name of department used in vendor calendar system.';
COMMENT ON COLUMN apismgr.EVENTS_DEPARTMENTS.CREATED_AT IS 'Stores SYSDATE when department was created.';
COMMENT ON COLUMN apismgr.EVENTS_DEPARTMENTS.UPDATED_AT IS 'Stores SYSDATE when department was updated.';
COMMENT ON COLUMN apismgr.EVENTS_DEPARTMENTS.DELETED_AT IS 'Stores SYSDATE when department was deleted.';

CREATE TABLE apismgr.EVENTS_FILTERS 
(
FILTER_ID  NUMBER NOT NULL,
NAME       VARCHAR2(256) NOT NULL,
CREATED_AT DATE NOT NULL,
UPDATED_AT DATE,
DELETED_AT DATE,
CONSTRAINT PK_EVENTS_FILTERS PRIMARY KEY 
  (
    FILTER_ID 
  )
  USING INDEX TABLESPACE INDX)
    TABLESPACE DATA
/

COMMENT ON TABLE apismgr.EVENTS_FILTERS IS 'Stores names of filters used for events in vendor calendar system.';
COMMENT ON COLUMN apismgr.EVENTS_FILTERS.FILTER_ID IS 'Primary key.';
COMMENT ON COLUMN apismgr.EVENTS_FILTERS.NAME IS 'Name of filter.';
COMMENT ON COLUMN apismgr.EVENTS_FILTERS.CREATED_AT IS 'Stores SYSDATE when filter was created.';
COMMENT ON COLUMN apismgr.EVENTS_FILTERS.UPDATED_AT IS 'Stores SYSDATE when filter was updated.';
COMMENT ON COLUMN apismgr.EVENTS_FILTERS.DELETED_AT IS 'Stores SYSDATE when filter was deleted.';

CREATE TABLE apismgr.EVENTS_FILTER_ITEMS 
(
  ITEM_ID    NUMBER NOT NULL,
  FILTER_ID  NUMBER NOT NULL,
