diff --git a/dspace-api/src/main/java/org/dspace/storage/rdbms/DatabaseUtils.java b/dspace-api/src/main/java/org/dspace/storage/rdbms/DatabaseUtils.java index 12a79b0a43..3f12f5dab5 100644 --- a/dspace-api/src/main/java/org/dspace/storage/rdbms/DatabaseUtils.java +++ b/dspace-api/src/main/java/org/dspace/storage/rdbms/DatabaseUtils.java @@ -267,18 +267,22 @@ public class DatabaseUtils DatabaseMetaData meta = connection.getMetaData(); // NOTE: we use "findDbKeyword()" here as it won't cause // DatabaseManager.initialize() to be called (which in turn auto-calls Flyway) - String scriptFolder = DatabaseManager.findDbKeyword(meta); + String dbType = DatabaseManager.findDbKeyword(meta); connection.close(); // Determine location(s) where Flyway will load all DB migrations ArrayList scriptLocations = new ArrayList(); - // First, add location of SQL migrations (based on DB Type) + // First, add location for custom SQL migrations, if any (based on DB Type) // e.g. [dspace.dir]/etc/[dbtype]/ scriptLocations.add("filesystem:" + ConfigurationManager.getProperty("dspace.dir") + - "/etc/migrations/" + scriptFolder); + "/etc/" + dbType); - // Next, add the Java package where Flyway will load Java migrations from + // Also add the Java package where Flyway will load SQL migrations from (based on DB Type) + scriptLocations.add("classpath:org.dspace.storage.rdbms.sqlmigration." + dbType); + + // Also add the Java package where Flyway will load Java migrations from + // NOTE: this also loads migrations from any sub-package scriptLocations.add("classpath:org.dspace.storage.rdbms.migration"); // Special scenario: If XMLWorkflows are enabled, we need to run its migration(s) diff --git a/dspace/etc/migrations/h2/README.md b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/README.md similarity index 95% rename from dspace/etc/migrations/h2/README.md rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/README.md index e38440ac77..8088c6ccca 100644 --- a/dspace/etc/migrations/h2/README.md +++ b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/README.md @@ -9,9 +9,8 @@ By default, the DSpace Unit Testing environment configures H2 to run in These database migrations are automatically called by [Flyway](http://flywaydb.org/) when the `DatabaseManager` initializes itself (see `initializeDatabase()` method). -The H2 migrations in this directory are *based on* the Oracle Migrations -(`[src]/dspace/etc/migrations/oracle/*.sql`), but with some modifications in -order to be valid in H2. +The H2 migrations in this directory are *based on* the Oracle Migrations, but +with some modifications in order to be valid in H2. ## Oracle vs H2 script differences diff --git a/dspace/etc/migrations/h2/V1.2__Initial_DSpace_1.2_Oracle_database_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.2__Initial_DSpace_1.2_Oracle_database_schema.sql similarity index 100% rename from dspace/etc/migrations/h2/V1.2__Initial_DSpace_1.2_Oracle_database_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.2__Initial_DSpace_1.2_Oracle_database_schema.sql diff --git a/dspace/etc/migrations/h2/V1.3__Upgrade_to_DSpace_1.3_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.3__Upgrade_to_DSpace_1.3_schema.sql similarity index 100% rename from dspace/etc/migrations/h2/V1.3__Upgrade_to_DSpace_1.3_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.3__Upgrade_to_DSpace_1.3_schema.sql diff --git a/dspace/etc/migrations/h2/V1.4.2__Upgrade_to_DSpace_1.4.2_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.4.2__Upgrade_to_DSpace_1.4.2_schema.sql similarity index 100% rename from dspace/etc/migrations/h2/V1.4.2__Upgrade_to_DSpace_1.4.2_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.4.2__Upgrade_to_DSpace_1.4.2_schema.sql diff --git a/dspace/etc/migrations/h2/V1.4__Upgrade_to_DSpace_1.4_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.4__Upgrade_to_DSpace_1.4_schema.sql similarity index 100% rename from dspace/etc/migrations/h2/V1.4__Upgrade_to_DSpace_1.4_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.4__Upgrade_to_DSpace_1.4_schema.sql diff --git a/dspace/etc/migrations/h2/V1.5__Upgrade_to_DSpace_1.5_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.5__Upgrade_to_DSpace_1.5_schema.sql similarity index 100% rename from dspace/etc/migrations/h2/V1.5__Upgrade_to_DSpace_1.5_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.5__Upgrade_to_DSpace_1.5_schema.sql diff --git a/dspace/etc/migrations/h2/V1.6__Upgrade_to_DSpace_1.6_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.6__Upgrade_to_DSpace_1.6_schema.sql similarity index 100% rename from dspace/etc/migrations/h2/V1.6__Upgrade_to_DSpace_1.6_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.6__Upgrade_to_DSpace_1.6_schema.sql diff --git a/dspace/etc/migrations/h2/V1.7__Upgrade_to_DSpace_1.7_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.7__Upgrade_to_DSpace_1.7_schema.sql similarity index 100% rename from dspace/etc/migrations/h2/V1.7__Upgrade_to_DSpace_1.7_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.7__Upgrade_to_DSpace_1.7_schema.sql diff --git a/dspace/etc/migrations/h2/V1.8__Upgrade_to_DSpace_1.8_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.8__Upgrade_to_DSpace_1.8_schema.sql similarity index 100% rename from dspace/etc/migrations/h2/V1.8__Upgrade_to_DSpace_1.8_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V1.8__Upgrade_to_DSpace_1.8_schema.sql diff --git a/dspace/etc/migrations/h2/V3.0__Upgrade_to_DSpace_3.x_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V3.0__Upgrade_to_DSpace_3.x_schema.sql similarity index 100% rename from dspace/etc/migrations/h2/V3.0__Upgrade_to_DSpace_3.x_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V3.0__Upgrade_to_DSpace_3.x_schema.sql diff --git a/dspace/etc/migrations/h2/V4.0__Upgrade_to_DSpace_4.x_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V4.0__Upgrade_to_DSpace_4.x_schema.sql similarity index 100% rename from dspace/etc/migrations/h2/V4.0__Upgrade_to_DSpace_4.x_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V4.0__Upgrade_to_DSpace_4.x_schema.sql diff --git a/dspace/etc/migrations/h2/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql similarity index 100% rename from dspace/etc/migrations/h2/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql diff --git a/dspace/etc/migrations/h2/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql similarity index 100% rename from dspace/etc/migrations/h2/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql diff --git a/dspace/etc/migrations/oracle/README.md b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/README.md similarity index 100% rename from dspace/etc/migrations/oracle/README.md rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/README.md diff --git a/dspace/etc/migrations/oracle/V1.2__Initial_DSpace_1.2_Oracle_database_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.2__Initial_DSpace_1.2_Oracle_database_schema.sql similarity index 100% rename from dspace/etc/migrations/oracle/V1.2__Initial_DSpace_1.2_Oracle_database_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.2__Initial_DSpace_1.2_Oracle_database_schema.sql diff --git a/dspace/etc/migrations/oracle/V1.3__Upgrade_to_DSpace_1.3_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.3__Upgrade_to_DSpace_1.3_schema.sql similarity index 100% rename from dspace/etc/migrations/oracle/V1.3__Upgrade_to_DSpace_1.3_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.3__Upgrade_to_DSpace_1.3_schema.sql diff --git a/dspace/etc/migrations/oracle/V1.4.2__Upgrade_to_DSpace_1.4.2_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.4.2__Upgrade_to_DSpace_1.4.2_schema.sql similarity index 100% rename from dspace/etc/migrations/oracle/V1.4.2__Upgrade_to_DSpace_1.4.2_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.4.2__Upgrade_to_DSpace_1.4.2_schema.sql diff --git a/dspace/etc/migrations/oracle/V1.4__Upgrade_to_DSpace_1.4_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.4__Upgrade_to_DSpace_1.4_schema.sql similarity index 100% rename from dspace/etc/migrations/oracle/V1.4__Upgrade_to_DSpace_1.4_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.4__Upgrade_to_DSpace_1.4_schema.sql diff --git a/dspace/etc/migrations/oracle/V1.5__Upgrade_to_DSpace_1.5_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.5__Upgrade_to_DSpace_1.5_schema.sql similarity index 100% rename from dspace/etc/migrations/oracle/V1.5__Upgrade_to_DSpace_1.5_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.5__Upgrade_to_DSpace_1.5_schema.sql diff --git a/dspace/etc/migrations/oracle/V1.6__Upgrade_to_DSpace_1.6_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.6__Upgrade_to_DSpace_1.6_schema.sql similarity index 100% rename from dspace/etc/migrations/oracle/V1.6__Upgrade_to_DSpace_1.6_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.6__Upgrade_to_DSpace_1.6_schema.sql diff --git a/dspace/etc/migrations/oracle/V1.7__Upgrade_to_DSpace_1.7_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.7__Upgrade_to_DSpace_1.7_schema.sql similarity index 100% rename from dspace/etc/migrations/oracle/V1.7__Upgrade_to_DSpace_1.7_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.7__Upgrade_to_DSpace_1.7_schema.sql diff --git a/dspace/etc/migrations/oracle/V1.8__Upgrade_to_DSpace_1.8_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.8__Upgrade_to_DSpace_1.8_schema.sql similarity index 100% rename from dspace/etc/migrations/oracle/V1.8__Upgrade_to_DSpace_1.8_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V1.8__Upgrade_to_DSpace_1.8_schema.sql diff --git a/dspace/etc/migrations/oracle/V3.0__Upgrade_to_DSpace_3.x_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V3.0__Upgrade_to_DSpace_3.x_schema.sql similarity index 100% rename from dspace/etc/migrations/oracle/V3.0__Upgrade_to_DSpace_3.x_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V3.0__Upgrade_to_DSpace_3.x_schema.sql diff --git a/dspace/etc/migrations/oracle/V4.0__Upgrade_to_DSpace_4.x_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V4.0__Upgrade_to_DSpace_4.x_schema.sql similarity index 100% rename from dspace/etc/migrations/oracle/V4.0__Upgrade_to_DSpace_4.x_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V4.0__Upgrade_to_DSpace_4.x_schema.sql diff --git a/dspace/etc/migrations/oracle/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql similarity index 100% rename from dspace/etc/migrations/oracle/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql diff --git a/dspace/etc/migrations/oracle/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql similarity index 100% rename from dspace/etc/migrations/oracle/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql diff --git a/dspace/etc/migrations/postgres/README.md b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/README.md similarity index 100% rename from dspace/etc/migrations/postgres/README.md rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/README.md diff --git a/dspace/etc/migrations/postgres/V1.1__Initial_DSpace_1.1_database_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.1__Initial_DSpace_1.1_database_schema.sql similarity index 100% rename from dspace/etc/migrations/postgres/V1.1__Initial_DSpace_1.1_database_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.1__Initial_DSpace_1.1_database_schema.sql diff --git a/dspace/etc/migrations/postgres/V1.2__Upgrade_to_DSpace_1.2_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.2__Upgrade_to_DSpace_1.2_schema.sql similarity index 100% rename from dspace/etc/migrations/postgres/V1.2__Upgrade_to_DSpace_1.2_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.2__Upgrade_to_DSpace_1.2_schema.sql diff --git a/dspace/etc/migrations/postgres/V1.3__Upgrade_to_DSpace_1.3_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.3__Upgrade_to_DSpace_1.3_schema.sql similarity index 100% rename from dspace/etc/migrations/postgres/V1.3__Upgrade_to_DSpace_1.3_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.3__Upgrade_to_DSpace_1.3_schema.sql diff --git a/dspace/etc/migrations/postgres/V1.4__Upgrade_to_DSpace_1.4_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.4__Upgrade_to_DSpace_1.4_schema.sql similarity index 100% rename from dspace/etc/migrations/postgres/V1.4__Upgrade_to_DSpace_1.4_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.4__Upgrade_to_DSpace_1.4_schema.sql diff --git a/dspace/etc/migrations/postgres/V1.5__Upgrade_to_DSpace_1.5_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.5__Upgrade_to_DSpace_1.5_schema.sql similarity index 100% rename from dspace/etc/migrations/postgres/V1.5__Upgrade_to_DSpace_1.5_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.5__Upgrade_to_DSpace_1.5_schema.sql diff --git a/dspace/etc/migrations/postgres/V1.6__Upgrade_to_DSpace_1.6_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.6__Upgrade_to_DSpace_1.6_schema.sql similarity index 100% rename from dspace/etc/migrations/postgres/V1.6__Upgrade_to_DSpace_1.6_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.6__Upgrade_to_DSpace_1.6_schema.sql diff --git a/dspace/etc/migrations/postgres/V1.7__Upgrade_to_DSpace_1.7_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.7__Upgrade_to_DSpace_1.7_schema.sql similarity index 100% rename from dspace/etc/migrations/postgres/V1.7__Upgrade_to_DSpace_1.7_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.7__Upgrade_to_DSpace_1.7_schema.sql diff --git a/dspace/etc/migrations/postgres/V1.8__Upgrade_to_DSpace_1.8_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.8__Upgrade_to_DSpace_1.8_schema.sql similarity index 100% rename from dspace/etc/migrations/postgres/V1.8__Upgrade_to_DSpace_1.8_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.8__Upgrade_to_DSpace_1.8_schema.sql diff --git a/dspace/etc/migrations/postgres/V3.0__Upgrade_to_DSpace_3.x_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V3.0__Upgrade_to_DSpace_3.x_schema.sql similarity index 100% rename from dspace/etc/migrations/postgres/V3.0__Upgrade_to_DSpace_3.x_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V3.0__Upgrade_to_DSpace_3.x_schema.sql diff --git a/dspace/etc/migrations/postgres/V4.0__Upgrade_to_DSpace_4.x_schema.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V4.0__Upgrade_to_DSpace_4.x_schema.sql similarity index 100% rename from dspace/etc/migrations/postgres/V4.0__Upgrade_to_DSpace_4.x_schema.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V4.0__Upgrade_to_DSpace_4.x_schema.sql diff --git a/dspace/etc/migrations/postgres/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql similarity index 100% rename from dspace/etc/migrations/postgres/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V5.0_2014.08.08__DS-1945_Helpdesk_Request_a_Copy.sql diff --git a/dspace/etc/migrations/postgres/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql similarity index 100% rename from dspace/etc/migrations/postgres/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql rename to dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql diff --git a/dspace/etc/oracle/NOTICE.md b/dspace/etc/oracle/README.md similarity index 56% rename from dspace/etc/oracle/NOTICE.md rename to dspace/etc/oracle/README.md index ce8a3ff555..eaae189017 100644 --- a/dspace/etc/oracle/NOTICE.md +++ b/dspace/etc/oracle/README.md @@ -1,25 +1,24 @@ # DSpace Database Now Upgrades Automatically -AS OF DSPACE 5.0, the DSpace database now upgrades itself AUTOMATICALLY. +AS OF DSPACE 5, the DSpace database now upgrades itself AUTOMATICALLY. Therefore, all `database_schema*.sql` files have been removed. Starting -with DSpace 4.x -> 5.0 upgrade, you will no longer need to manually run any +with DSpace 4.x -> 5.0 upgrade, you will no longer need to manually run any SQL scripts to upgrade your database. -However, if you have not yet upgraded to DSpace 4.x, YOU MUST MANUALLY DO SO. -Those manual `database_schema*.sql` scripts can still be found in the -DSpace 4.x source code at: +Please see the [5.0 Upgrade Instructions](https://wiki.duraspace.org/display/DSDOC5x/Upgrading+to+5.x) +for more information on upgrading to DSpace 5. -https://github.com/DSpace/DSpace/tree/dspace-4_x/dspace/etc/oracle/ -## More info on automatic database upgrades (for developers) +## More info on automatic database upgrades -As of DSpace 5.0, we now use [Flyway DB](http://flywaydb.org/) along with -the scripts under `[dspace]/etc/migrations/oracle` to automatically keep your -DSpace database up-to-date. +As of DSpace 5.0, we now use [Flyway DB](http://flywaydb.org/) along with the +SQL scripts embedded in the `dspace-api.jar` to automatically keep your DSpace +database up-to-date. These scripts are now located in the source code at: +`[dspace-src]/dspace-api/src/main/java/resources/org/dspace/storage/rdbms/sqlmigration/oracle` -As Flyway automates the upgrade process, you should NEVER run these scripts -manually. For more information, please see the `README` in the scripts directory. +As Flyway automates the upgrade process, you should NEVER run these SQL scripts +manually. For more information, please see the `README.md` in the scripts directory. ## Using the update-sequences.sql script @@ -31,4 +30,4 @@ feature). This `update-sequences.sql` script can be run manually. It will not harm your database (or its contents) in any way. It just ensures all database counts (i.e. -sequences) are properly set to the next available value. +sequences) are properly set to the next available value. \ No newline at end of file diff --git a/dspace/etc/postgres/NOTICE.md b/dspace/etc/postgres/README.md similarity index 62% rename from dspace/etc/postgres/NOTICE.md rename to dspace/etc/postgres/README.md index 7bc6611a24..a8210ca397 100644 --- a/dspace/etc/postgres/NOTICE.md +++ b/dspace/etc/postgres/README.md @@ -1,25 +1,24 @@ # DSpace Database Now Upgrades Automatically -AS OF DSPACE 5.0, the DSpace database now upgrades itself AUTOMATICALLY. +AS OF DSPACE 5, the DSpace database now upgrades itself AUTOMATICALLY. Therefore, all `database_schema*.sql` files have been removed. Starting -with DSpace 4.x -> 5.0 upgrade, you will no longer need to manually run any +with DSpace 4.x -> 5.0 upgrade, you will no longer need to manually run any SQL scripts to upgrade your database. -However, if you have not yet upgraded to DSpace 4.x, YOU MUST MANUALLY DO SO. -Those manual `database_schema*.sql` scripts can still be found in the -DSpace 4.x source code at: +Please see the [5.0 Upgrade Instructions](https://wiki.duraspace.org/display/DSDOC5x/Upgrading+to+5.x) +for more information on upgrading to DSpace 5. -https://github.com/DSpace/DSpace/tree/dspace-4_x/dspace/etc/postgres/ ## More info on automatic database upgrades -As of DSpace 5.0, we now use [Flyway DB](http://flywaydb.org/) along with -the scripts under `[dspace]/etc/migrations/oracle` to automatically keep your -DSpace database up-to-date. +As of DSpace 5.0, we now use [Flyway DB](http://flywaydb.org/) along with the +SQL scripts embedded in the `dspace-api.jar` to automatically keep your DSpace +database up-to-date. These scripts are now located in the source code at: +`[dspace-src]/dspace-api/src/main/java/resources/org/dspace/storage/rdbms/sqlmigration/postgres` -As Flyway automates the upgrade process, you should NEVER run these scripts -manually. For more information, please see the `README` in the scripts directory. +As Flyway automates the upgrade process, you should NEVER run these SQL scripts +manually. For more information, please see the `README.md` in the scripts directory. ## Using the update-sequences.sql script