Commit Graph

12 Commits

Author SHA1 Message Date
Robert Tansley
35e9b51a53 Some database changes for dealing with concurrent ID generation problems.
(SF bug #495059)
- SQL file separated into database_schema.sql, for creating the schema,
  clean-database.sql, which removes tables, views etc. from an existing
  DSpace database, and update-sequences.sql which resets the ID generators,
  but is only used after an SQL dump which sets explicit primary keys.
- Sequences for primary key generation added to SQL schema
- SQL function "getnextid" added as an abstraction for access to those sequences
- Database manager now uses getnextid() SQL function to get IDs - this means
  other DB backends can hide ID generation specifics behind this
- Minor tweak to HistoryManager, which was accessing DB manager's in-memory
  ID generator directly - now it doesn't do this.
- Old, now unnecessary "reset ID generator" admin servlet/JSP removed


git-svn-id: http://scm.dspace.org/svn/repo/trunk@362 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-09-09 19:44:33 +00:00
Robert Tansley
4cf29737b5 fileextension.id renamed to fileextension.file_extension_id in keeping with
conventions used elsewhere in the schema


git-svn-id: http://scm.dspace.org/svn/repo/trunk@357 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-09-06 14:23:29 +00:00
David Stuve
30241d3ab8 modified resourcepolicy table
git-svn-id: http://scm.dspace.org/svn/repo/trunk@331 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-08-30 14:37:27 +00:00
Robert Tansley
992de42a17 formatidentifier table renamed to fileextension.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@274 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-08-15 18:12:27 +00:00
Robert Tansley
16c8dc047b Cleaned-up submission UI
git-svn-id: http://scm.dspace.org/svn/repo/trunk@232 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-07-22 17:38:21 +00:00
Robert Tansley
eefb15465a - Removed DCResult
- Renamed workflow-related columns in Collection:
    reviewers => workflow_step_1
    approvers => workflow_step_2
    editors   => workflow_step 3


git-svn-id: http://scm.dspace.org/svn/repo/trunk@63 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-05-30 21:02:39 +00:00
David Stuve
a7264d107c resourcepolicy edits
renamed resource_filter => container_type_id
renamed resource_filter_arg => container_id
del notes
del eperson_owner
del priority


git-svn-id: http://scm.dspace.org/svn/repo/trunk@59 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-05-30 17:56:45 +00:00
Peter Breton
54ddd5583e Authorship credited to DSpace team
Remove some old comments
Remove test tables
Remove sorttitle function


git-svn-id: http://scm.dspace.org/svn/repo/trunk@55 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-05-30 15:45:28 +00:00
Peter Breton
e19f8871d0 Top-level browse views (ItemsByTitle, ItemsByDate, ItemsByAuthor, ItemsByDateAccessioned) converted to tables
Community and Collection browse views remain views, but are no longer
  dynamically ordered.


git-svn-id: http://scm.dspace.org/svn/repo/trunk@54 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-05-30 15:17:27 +00:00
Robert Tansley
67fd4e93a9 Made some changes to the DB. ContentTest fails - will check when I have time
git-svn-id: http://scm.dspace.org/svn/repo/trunk@52 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-05-30 14:50:46 +00:00
Robert Tansley
7160ceb7db Schema tweaks:
Changes from original SQL:


MODIFIED DCValue

  from:

    CREATE TABLE DCValue
    (
      dc_value_id   INTEGER PRIMARY KEY,
      text_value TEXT,
      text_lang  VARCHAR(24),
      source_id  INTEGER
    );


  to:

    CREATE TABLE DCValue
    (
      dc_value_id   INTEGER PRIMARY KEY,
      item_id       INTEGER REFERENCES Item(item_id),
      dc_type_id    INTEGER REFERENCES DCTypeRegistry(dc_type_id),
      text_value TEXT,
      text_lang  VARCHAR(24),
      place      INTEGER
      source_id  INTEGER
    );
    CREATE INDEX dcvalue_dc_type_id_idx  on DCValue(dc_type_id);



REMOVED Item2DCValue

REMOVED Storage

REMOVED Bitstream2Storage

CHANGED Bitstream

  from:
    -------------------------------------------------------
    -- Bitstream table
    -------------------------------------------------------
    DROP TABLE Bitstream;

    CREATE TABLE Bitstream
    (
      bitstream_id          INTEGER PRIMARY KEY,
      bitstream_type_id     INTEGER REFERENCES BitstreamTypeRegistry(bitstream_type_id),
      name                  VARCHAR(256),
      size                  INTEGER,
      checksum              VARCHAR(64),
      checksum_algorithm    VARCHAR(32),
      description           TEXT,
      user_type_description TEXT,
      source                VARCHAR(256),
      deleted               BOOL
    );


  to:

    -------------------------------------------------------
    -- Bitstream table
    -------------------------------------------------------
    DROP TABLE Bitstream;

    CREATE TABLE Bitstream
    (
       bitstream_id          INTEGER PRIMARY KEY,
       bitstream_type_id     INTEGER REFERENCES BitstreamTypeRegistry(bitstream_type_id),
       name                  VARCHAR(256),
       size                  INTEGER,
       checksum              VARCHAR(64),
       checksum_algorithm    VARCHAR(32),
       description           TEXT,
       user_type_description TEXT,
       source                VARCHAR(256),
       internal_id           VARCHAR(256),
       deleted               BOOL
    );


Views:

REMOVED Item2Bitstream

REMOVED Collection2Bitstream

REMOVED Community2Bitstream

REMOVED WorkflowItemsBySubmitter

REMOVED PersonalWorkspaceBySubmitter

REMOVED AllStorage

REMOVED ItemVersion

CHANGED DCResult

  from:

    -------------------------------------------------------
    --  DCResult view
    -------------------------------------------------------
    DROP VIEW DCResult;

    CREATE VIEW DCResult as
    SELECT Item.item_id, Item.in_archive, Item.submitter_id, dc_type_id, DCValue.*
    FROM Item2DCValue, DCValue, Item
    WHERE Item2DCValue.dc_value_id = DCValue.dc_value_id
    AND Item.item_id = Item2DCValue.item_id
    ;


  to:
    -------------------------------------------------------
    --  DCResult view
    -------------------------------------------------------
    DROP VIEW DCResult;

    CREATE VIEW DCResult as
    SELECT DCValue.*, Item.in_archive, Item.submitter_id
    FROM DCValue, Item
    WHERE Item.item_id = DCValue.item_id
    ;


git-svn-id: http://scm.dspace.org/svn/repo/trunk@15 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-05-16 18:10:04 +00:00
Robert Tansley
79dfe61844 Added DBMS build tasks:
- Added schema file
- Add InitializeDatabase command line class
- Can now pass in "dspace.configuration" system property which will get
  ConfigurationManager to load a specific configuration
- Added a simple log4j properties file for use during builds (e.g. when
  executing InitializeDatabase)
- Changed a couple of INFO level logs to DEBUG in DatabaseManager


git-svn-id: http://scm.dspace.org/svn/repo/trunk@7 9c30dcfa-912a-0410-8fc2-9e0234be79fd
2002-05-08 20:56:00 +00:00