 DROP SEQUENCE itemsbydateaccessioned_seq;
 DROP SEQUENCE itemsbysubject_seq;
 
-DROP TABLE ItemsByAuthor CASCADE;
-DROP TABLE ItemsByTitle CASCADE;
-DROP TABLE ItemsByDate CASCADE;
-DROP TABLE ItemsByDateAccessioned CASCADE;
-DROP TABLE ItemsBySubject CASCADE;
+DROP TABLE ItemsByAuthor CASCADE CONSTRAINTS;
+DROP TABLE ItemsByTitle CASCADE CONSTRAINTS;
+DROP TABLE ItemsByDate CASCADE CONSTRAINTS;
+DROP TABLE ItemsByDateAccessioned CASCADE CONSTRAINTS;
+DROP TABLE ItemsBySubject CASCADE CONSTRAINTS;
+
+DROP TABLE History CASCADE CONSTRAINTS;
+DROP TABLE HistoryState CASCADE CONSTRAINTS;
 
 ----------------------------------------------------------------
 -- Add indexes for foreign key columns

CREATE INDEX g2g_parent_fk_idx ON Group2Group(parent_id);
CREATE INDEX g2g_child_fk_idx ON Group2Group(child_id);

CREATE INDEX g2gc_parent_fk_idx ON Group2Group(parent_id);
CREATE INDEX g2gc_child_fk_idx ON Group2Group(child_id);

CREATE INDEX item_submitter_fk_idx ON Item(submitter_id);


CREATE INDEX workspace_item_fk_idx ON WorkspaceItem(item_id);
CREATE INDEX workspace_coll_fk_idx ON WorkspaceItem(collection_id);

-- CREATE INDEX workflow_item_fk_idx ON WorkflowItem(item_id);
CREATE INDEX workflow_coll_fk_idx ON WorkflowItem(collection_id);
CREATE INDEX workflow_owner_fk_idx ON WorkflowItem(owner);

