mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-23 01:43:07 +00:00
Fix for Postgres for DS-423: Ant target 'clean_database' doesn't drop all tables. A fix for Oracle will also be coming.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4718 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -46,34 +46,18 @@
|
||||
|
||||
|
||||
-- Drop the views
|
||||
DROP VIEW CommunityItemsBySubject;
|
||||
DROP VIEW CollectionItemsBySubject;
|
||||
DROP VIEW CommunityItemsByDateAccession;
|
||||
DROP VIEW CollectionItemsByDateAccession;
|
||||
DROP VIEW CommunityItemsByDate;
|
||||
DROP VIEW CollectionItemsByDate;
|
||||
DROP VIEW CommunityItemsByTitle;
|
||||
DROP VIEW CollectionItemsByTitle;
|
||||
DROP VIEW CommunityItemsByAuthor;
|
||||
DROP VIEW CollectionItemsByAuthor;
|
||||
DROP VIEW Community2Item;
|
||||
DROP VIEW DCValue;
|
||||
|
||||
-- Then the tables
|
||||
-- WARNING: The ordering below MATTERS as many tables have interdependencies
|
||||
DROP TABLE collection_item_count;
|
||||
DROP TABLE community_item_count;
|
||||
DROP TABLE checksum_history;
|
||||
DROP TABLE most_recent_checksum;
|
||||
DROP TABLE checksum_results;
|
||||
DROP TABLE ItemsBySubject;
|
||||
DROP TABLE ItemsByDateAccessioned;
|
||||
DROP TABLE ItemsByDate;
|
||||
DROP TABLE ItemsByTitle;
|
||||
DROP TABLE ItemsByAuthor;
|
||||
DROP TABLE Communities2Item;
|
||||
DROP TABLE EPersonGroup2WorkspaceItem;
|
||||
DROP TABLE HistoryState;
|
||||
DROP TABLE History;
|
||||
DROP TABLE Subscription;
|
||||
DROP TABLE RegistrationData;
|
||||
DROP TABLE TasklistItem;
|
||||
@@ -85,25 +69,28 @@ DROP TABLE ResourcePolicy;
|
||||
DROP TABLE Collection2Item;
|
||||
DROP TABLE Community2Collection;
|
||||
DROP TABLE Community2Community;
|
||||
DROP TABLE Collection;
|
||||
DROP TABLE Community;
|
||||
DROP TABLE MetadataValue;
|
||||
DROP TABLE MetadataFieldRegistry;
|
||||
DROP TABLE MetadataSchemaRegistry;
|
||||
DROP TABLE Bundle2Bitstream;
|
||||
DROP TABLE Item2Bundle;
|
||||
DROP TABLE Bundle;
|
||||
DROP TABLE most_recent_checksum;
|
||||
DROP TABLE checksum_history;
|
||||
DROP TABLE checksum_results;
|
||||
DROP TABLE Item;
|
||||
DROP TABLE harvested_collection;
|
||||
DROP TABLE harvested_item;
|
||||
DROP TABLE Group2GroupCache;
|
||||
DROP TABLE Group2Group;
|
||||
DROP TABLE FileExtension;
|
||||
-- Drop main object tables near end as many other tables have dependencies on them
|
||||
DROP TABLE Community;
|
||||
DROP TABLE Collection;
|
||||
DROP TABLE Item;
|
||||
DROP TABLE Bundle;
|
||||
DROP TABLE Bitstream;
|
||||
-- BitstreamFormatRegistry is referenced by bitstreams
|
||||
DROP TABLE BitstreamFormatRegistry;
|
||||
-- People and Groups are referenced by Items, Collections, Communities
|
||||
DROP TABLE EPersonGroup;
|
||||
DROP TABLE EPerson;
|
||||
DROP TABLE Bitstream;
|
||||
DROP TABLE FileExtension;
|
||||
DROP TABLE BitstreamFormatRegistry;
|
||||
|
||||
|
||||
-- Now drop the sequences for ID (primary key) creation
|
||||
DROP SEQUENCE bitstreamformatregistry_seq;
|
||||
@@ -130,20 +117,15 @@ DROP SEQUENCE workflowitem_seq;
|
||||
DROP SEQUENCE tasklistitem_seq;
|
||||
DROP SEQUENCE registrationdata_seq;
|
||||
DROP SEQUENCE subscription_seq;
|
||||
DROP SEQUENCE history_seq;
|
||||
DROP SEQUENCE historystate_seq;
|
||||
DROP SEQUENCE communities2item_seq;
|
||||
DROP SEQUENCE itemsbyauthor_seq;
|
||||
DROP SEQUENCE itemsbytitle_seq;
|
||||
DROP SEQUENCE itemsbydate_seq;
|
||||
DROP SEQUENCE itemsbydateaccessioned_seq;
|
||||
DROP SEQUENCE itemsbysubject_seq;
|
||||
DROP SEQUENCE epersongroup2workspaceitem_seq;
|
||||
DROP SEQUENCE metadataschemaregistry_seq;
|
||||
DROP SEQUENCE metadatafieldregistry_seq;
|
||||
DROP SEQUENCE metadatavalue_seq;
|
||||
DROP SEQUENCE group2group_seq;
|
||||
DROP SEQUENCE group2groupcache_seq;
|
||||
DROP SEQUENCE harvested_collection_seq;
|
||||
DROP SEQUENCE harvested_item_seq;
|
||||
|
||||
-- Drop the getnextid() function
|
||||
DROP FUNCTION getnextid(VARCHAR(40));
|
||||
|
Reference in New Issue
Block a user