mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-23 09:53:09 +00:00
Added schema patch for 1.2 release
git-svn-id: http://scm.dspace.org/svn/repo/trunk@872 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
53
dspace/etc/database_schema_11-12.sql
Normal file
53
dspace/etc/database_schema_11-12.sql
Normal file
@@ -0,0 +1,53 @@
|
||||
-- Patch file to upgrade schema from database_schema.sql 1.22 (dspace-1_1, dspace-1_1_1)
|
||||
-- to revision 1.28 (current candidate for inclusion in dspace-1_2)
|
||||
|
||||
-- DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST.
|
||||
-- DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST.
|
||||
-- DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST. DUMP YOUR DATABASE FIRST.
|
||||
|
||||
ALTER TABLE Bitstream ADD sequence_id INTEGER;
|
||||
ALTER TABLE Item ADD owning_collection INTEGER;
|
||||
ALTER TABLE Bundle ADD name VARCHAR(16);
|
||||
ALTER TABLE Bundle ADD primary_bitstream_id INTEGER;
|
||||
ALTER TABLE Bundle ADD CONSTRAINT primary_bitstream_id_fk FOREIGN KEY (primary_bitstream_id) REFERENCES Bitstream(bitstream_id);
|
||||
CREATE TABLE Community2Community
|
||||
(
|
||||
id INTEGER PRIMARY KEY,
|
||||
parent_comm_id INTEGER REFERENCES Community(community_id),
|
||||
child_comm_id INTEGER REFERENCES Community(community_id)
|
||||
);
|
||||
|
||||
CREATE TABLE Communities2Item
|
||||
(
|
||||
id INTEGER PRIMARY KEY,
|
||||
community_id INTEGER REFERENCES Community(community_id),
|
||||
item_id INTEGER REFERENCES Item(item_id)
|
||||
);
|
||||
|
||||
DROP VIEW CommunityItemsByAuthor;
|
||||
CREATE VIEW CommunityItemsByAuthor as
|
||||
SELECT Communities2Item.community_id, ItemsByAuthor.*
|
||||
FROM ItemsByAuthor, Communities2Item
|
||||
WHERE ItemsByAuthor.item_id = Communities2Item.item_id
|
||||
;
|
||||
|
||||
DROP VIEW CommunityItemsByTitle;
|
||||
CREATE VIEW CommunityItemsByTitle as
|
||||
SELECT Communities2Item.community_id, ItemsByTitle.*
|
||||
FROM ItemsByTitle, Communities2Item
|
||||
WHERE ItemsByTitle.item_id = Communities2Item.item_id
|
||||
;
|
||||
|
||||
DROP VIEW CommunityItemsByDate;
|
||||
CREATE VIEW CommunityItemsByDate as
|
||||
SELECT Communities2Item.community_id, ItemsByDate.*
|
||||
FROM ItemsByDate, Communities2Item
|
||||
WHERE ItemsByDate.item_id = Communities2Item.item_id
|
||||
;
|
||||
|
||||
DROP VIEW CommunityItemsByDateAccession;
|
||||
CREATE VIEW CommunityItemsByDateAccession as
|
||||
SELECT Communities2Item.community_id, ItemsByDateAccessioned.*
|
||||
FROM ItemsByDateAccessioned, Communities2Item
|
||||
WHERE ItemsByDateAccessioned.item_id = Communities2Item.item_id
|
||||
;
|
Reference in New Issue
Block a user