SuccessConsole Output

Started by an SCM change
Running as SYSTEM
Building in workspace /var/lib/jenkins/jobs/bookkeeper-unstable/workspace
No credentials specified
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/dataoneorg/bookkeeper # timeout=10
Fetching upstream changes from https://github.com/dataoneorg/bookkeeper
 > git --version # timeout=10
 > git fetch --tags --progress https://github.com/dataoneorg/bookkeeper +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision 471a7e468df9df87874e22d303a7dd5eaeb36620 (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 471a7e468df9df87874e22d303a7dd5eaeb36620
Commit message: "Remove references to memberships."
 > git rev-list --no-walk f9bdfd490e52df770e6d4dd277ef89f2671c6016 # timeout=10
Parsing POMs
Established TCP socket on 44027
[workspace] $ java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.13.jar:/usr/share/maven/boot/plexus-classworlds-2.x.jar:/usr/share/maven/conf/logging jenkins.maven3.agent.Maven35Main /usr/share/maven /var/cache/jenkins/war/WEB-INF/lib/remoting-4.3.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.13.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.13.jar 44027
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven:  -B -f /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/pom.xml clean deploy -Durl=file:///var/www/maven
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< org.dataone:bookkeeper >-----------------------
[INFO] Building bookkeeper 0.1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from sonatype.org: https://repository.sonatype.org/content/shadows/centralm1/com/googlecode/foresite-toolkit/foresite/1.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/net/minidev/json-smart/maven-metadata.xml
[INFO] Downloading from dataone.org: http://maven.dataone.org/net/minidev/json-smart/maven-metadata.xml
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/net/minidev/json-smart/maven-metadata.xml (849 B at 7.3 kB/s)
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ bookkeeper ---
[INFO] Deleting /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ bookkeeper ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 15 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ bookkeeper ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 36 source files to /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes
[INFO] /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/src/main/java/org/dataone/bookkeeper/resources/QuotasResource.java: Some input files use unchecked or unsafe operations.
[INFO] /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/src/main/java/org/dataone/bookkeeper/resources/QuotasResource.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ bookkeeper ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ bookkeeper ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 22 source files to /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ bookkeeper ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.dataone.bookkeeper.api.OrderTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.549 s - in org.dataone.bookkeeper.api.OrderTest
[INFO] Running org.dataone.bookkeeper.api.ProductTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 s - in org.dataone.bookkeeper.api.ProductTest
[INFO] Running org.dataone.bookkeeper.api.AddressTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in org.dataone.bookkeeper.api.AddressTest
[INFO] Running org.dataone.bookkeeper.api.UsageTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 s - in org.dataone.bookkeeper.api.UsageTest
[INFO] Running org.dataone.bookkeeper.api.FeatureTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 s - in org.dataone.bookkeeper.api.FeatureTest
[INFO] Running org.dataone.bookkeeper.api.CustomerTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 s - in org.dataone.bookkeeper.api.CustomerTest
[INFO] Running org.dataone.bookkeeper.api.OrderItemTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in org.dataone.bookkeeper.api.OrderItemTest
[INFO] Running org.dataone.bookkeeper.api.QuotaTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s - in org.dataone.bookkeeper.api.QuotaTest
[INFO] Running org.dataone.bookkeeper.api.UsageStatusTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in org.dataone.bookkeeper.api.UsageStatusTest
[INFO] Running org.dataone.bookkeeper.jdbi.ProductStoreTest
19:09:02.913 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - Detected a Linux x86_64 system
19:09:03.011 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - Postgres binaries at /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca
19:09:03.617 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - The files belonging to this database system will be owned by user "jenkins".
19:09:03.617 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - This user must also own the server process.
19:09:03.617 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - 
19:09:03.660 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
19:09:03.661 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - The default text search configuration will be set to "english".
19:09:03.661 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - 
19:09:03.661 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - Data page checksums are disabled.
19:09:03.661 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - 
19:09:03.661 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - fixing permissions on existing directory /tmp/epg8650518897871218043 ... ok
19:09:03.674 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - creating subdirectories ... ok
19:09:03.720 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - selecting default max_connections ... 100
19:09:03.741 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - selecting default shared_buffers ... 128MB
19:09:03.742 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - selecting dynamic shared memory implementation ... posix
19:09:05.473 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - creating configuration files ... ok
19:09:05.720 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - running bootstrap script ... ok
19:09:06.806 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - performing post-bootstrap initialization ... ok
19:09:07.010 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - syncing data to disk ... ok
19:09:07.010 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - 
19:09:07.010 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - Success. You can now start the database server using:
19:09:07.010 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - 
19:09:07.010 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg8650518897871218043 -l logfile start
19:09:07.010 [log:pid(1826)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:initdb - 
19:09:07.011 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - d449ad09-ce15-4004-92c3-9be25fb974fc initdb completed in 00:00:03.998
19:09:07.036 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - d449ad09-ce15-4004-92c3-9be25fb974fc postmaster started as java.lang.UNIXProcess@732f29af on port 5432.  Waiting up to PT10S for server startup to finish.
19:09:07.048 [log:pid(1874)] INFO pg-d449ad09-ce15-4004-92c3-9be25fb974fc - waiting for server to start....2020-10-07 19:09:07.048 UTC [1878] LOG:  listening on IPv6 address "::1", port 5432
19:09:07.048 [log:pid(1874)] INFO pg-d449ad09-ce15-4004-92c3-9be25fb974fc - 2020-10-07 19:09:07.048 UTC [1878] LOG:  listening on IPv4 address "127.0.0.1", port 5432
19:09:07.083 [log:pid(1874)] INFO pg-d449ad09-ce15-4004-92c3-9be25fb974fc - 2020-10-07 19:09:07.083 UTC [1878] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
19:09:07.143 [log:pid(1874)] INFO pg-d449ad09-ce15-4004-92c3-9be25fb974fc - 2020-10-07 19:09:07.143 UTC [1879] LOG:  database system was shut down at 2020-10-07 19:09:06 UTC
19:09:07.146 [log:pid(1874)] INFO pg-d449ad09-ce15-4004-92c3-9be25fb974fc - 2020-10-07 19:09:07.146 UTC [1878] LOG:  database system is ready to accept connections
19:09:07.147 [log:pid(1874)] INFO pg-d449ad09-ce15-4004-92c3-9be25fb974fc - 2020-10-07 19:09:07.147 UTC [1887] LOG:  incomplete startup packet
19:09:07.243 [log:pid(1874)] INFO pg-d449ad09-ce15-4004-92c3-9be25fb974fc -  done
19:09:07.243 [log:pid(1874)] INFO pg-d449ad09-ce15-4004-92c3-9be25fb974fc - server started
19:09:07.282 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - d449ad09-ce15-4004-92c3-9be25fb974fc postmaster startup finished in 00:00:00.262
19:09:07.301 [main] INFO org.flywaydb.core.internal.license.VersionPrinter - Flyway Community Edition 5.2.4 by Boxfuse
19:09:07.317 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
19:09:07.317 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
19:09:07.322 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:07.326 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:07.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:07.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:07.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:07.330 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:07.331 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:07.331 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:07.333 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:07.336 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:07.339 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:07.347 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
19:09:07.351 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
19:09:07.355 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Function_Update_Quota_Table_Usage.sql ...
19:09:07.360 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:07.361 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:07.361 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:07.364 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:07.365 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:07.365 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:07.366 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Usages_Add_Unique_Constraint.sql ...
19:09:07.366 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:07.367 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql ...
19:09:07.367 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:07.368 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
19:09:07.368 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:07.369 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:07.369 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:07.369 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:07.369 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:07.369 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:07.370 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:07.370 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:07.370 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:07.370 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:07.370 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:07.370 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:07.371 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:07.371 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:07.371 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:07.371 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:07.371 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:07.372 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
19:09:07.372 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:07.373 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:07.373 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 12: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:07.373 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Customers_Table.sql ...
19:09:07.374 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:07.374 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:07.375 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:07.375 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:07.375 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:07.375 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:07.375 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:07.375 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:07.375 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:07.376 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:07.376 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:07.376 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:07.376 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:07.376 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:07.376 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:07.376 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:07.376 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:07.377 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:07.377 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:07.377 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:07.377 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:07.377 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:07.377 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:07.378 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Create_Products_Table.sql ...
19:09:07.378 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:07.379 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:07.379 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:07.379 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:07.379 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:07.379 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:07.379 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:07.379 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:07.379 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:07.380 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:07.380 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:07.380 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:07.380 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:07.380 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:07.380 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:07.380 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:07.380 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:07.380 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:07.381 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:07.381 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:07.381 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:07.381 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:07.381 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:07.381 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Insert_Standard_Products.sql ...
19:09:07.383 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:07.384 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:07.386 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:07.387 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 64: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:07.391 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 84: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:07.392 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 104: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:07.393 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Create_Orders_Table.sql ...
19:09:07.393 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:07.394 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:07.394 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:07.394 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:07.394 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:07.394 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:07.394 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:07.395 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:07.395 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:07.395 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:07.395 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:07.395 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:07.395 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:07.395 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:07.395 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:07.395 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:07.395 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:07.396 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:07.396 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:07.396 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:07.396 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:07.396 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:07.396 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:07.396 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:07.396 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:07.396 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:07.397 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Alter_Quotas_Add_Order_FK.sql ...
19:09:07.397 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:07.398 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Alter_Orders_Add_Customer_FK.sql ...
19:09:07.398 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:07.398 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Create_Usages_Table.sql ...
19:09:07.398 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:07.399 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:07.399 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:07.399 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:07.399 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:07.399 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:07.399 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:07.399 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql (filename: V1.0__Create_Bookkeeper_Database.sql)
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.10__Create_Function_Update_Quota_Table_Usage.sql)
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.11__Alter_Usages_Add_Unique_Constraint.sql)
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql (filename: V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql)
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.1__Create_Quotas_Table.sql (filename: V1.1__Create_Quotas_Table.sql)
19:09:07.400 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.2__Insert_Standard_Quotas.sql (filename: V1.2__Insert_Standard_Quotas.sql)
19:09:07.401 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Customers_Table.sql (filename: V1.3__Create_Customers_Table.sql)
19:09:07.401 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Create_Products_Table.sql (filename: V1.4__Create_Products_Table.sql)
19:09:07.401 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Insert_Standard_Products.sql (filename: V1.5__Insert_Standard_Products.sql)
19:09:07.401 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Create_Orders_Table.sql (filename: V1.6__Create_Orders_Table.sql)
19:09:07.401 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql (filename: V1.7__Alter_Quotas_Add_Order_FK.sql)
19:09:07.401 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql (filename: V1.8__Alter_Orders_Add_Customer_FK.sql)
19:09:07.401 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Create_Usages_Table.sql (filename: V1.9__Create_Usages_Table.sql)
19:09:07.407 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 13 migrations (execution time 00:00.059s)
19:09:07.408 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
19:09:07.417 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
19:09:07.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
19:09:07.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 17: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:07.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:07.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:07.420 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:07.424 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.424 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:07.425 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.425 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:07.426 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.426 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
19:09:07.431 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
19:09:07.432 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
19:09:07.433 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
19:09:07.436 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.439 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
19:09:07.440 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:07.441 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.441 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:07.443 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.443 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:07.444 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.444 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:07.444 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.444 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:07.445 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.445 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:07.446 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.446 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:07.446 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.446 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:07.447 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.447 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:07.447 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.447 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:07.448 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.448 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:07.448 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.448 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:07.448 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.448 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:07.449 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.449 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:07.449 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.449 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:07.449 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:07.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:07.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.450 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
19:09:07.452 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.453 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
19:09:07.454 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:07.455 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:07.455 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:07.456 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:07.456 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:07.456 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:07.456 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
19:09:07.458 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.460 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Customers Table
19:09:07.461 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:07.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:07.464 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.464 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:07.464 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.464 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:07.465 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.465 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:07.466 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.466 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:07.466 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.466 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:07.466 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.466 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:07.467 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.467 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:07.467 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.467 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:07.467 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.467 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:07.468 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.468 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:07.468 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.468 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:07.468 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.468 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:07.469 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.469 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:07.469 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.469 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:07.470 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.470 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:07.470 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.470 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:07.470 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.470 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:07.471 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.471 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:07.471 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.471 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:07.471 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.471 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:07.472 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.472 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:07.472 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.472 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Customers Table
19:09:07.474 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.476 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Create Products Table
19:09:07.477 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:07.478 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.478 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:07.479 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.479 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:07.480 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.480 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:07.481 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.481 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:07.481 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.481 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:07.482 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.482 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:07.483 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.483 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:07.483 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.483 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:07.484 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.484 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:07.484 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.484 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:07.484 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.484 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:07.484 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.484 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:07.485 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.485 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:07.485 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.485 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:07.485 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.485 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:07.486 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.486 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:07.486 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.486 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:07.486 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.486 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:07.486 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.486 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:07.487 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.487 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:07.487 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.487 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:07.487 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.487 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:07.487 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.487 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Create Products Table
19:09:07.489 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.490 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Insert Standard Products
19:09:07.491 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:07.492 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:07.492 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:07.493 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:07.493 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:07.494 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:07.494 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:07.495 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:07.495 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:07.496 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:07.496 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:07.497 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:07.497 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Insert Standard Products
19:09:07.498 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.500 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Create Orders Table
19:09:07.501 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:07.502 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.502 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:07.503 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.504 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:07.504 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.504 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:07.505 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.505 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:07.505 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.505 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:07.506 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.506 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:07.506 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.506 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:07.507 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.507 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:07.507 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.507 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:07.507 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.507 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:07.508 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.508 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:07.508 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.508 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:07.508 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.508 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:07.508 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.508 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:07.509 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.509 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:07.509 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.509 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:07.509 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.509 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:07.509 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.509 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:07.509 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.509 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:07.510 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.510 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:07.510 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.510 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:07.510 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.510 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:07.510 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.510 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:07.510 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.510 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:07.511 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.511 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:07.511 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.511 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Create Orders Table
19:09:07.512 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.513 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:07.514 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:07.516 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.516 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:07.517 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.518 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:07.519 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:07.520 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.520 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:07.521 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.523 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Create Usages Table
19:09:07.523 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:07.524 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.524 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:07.525 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.525 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:07.526 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.526 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:07.526 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.526 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:07.527 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.527 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:07.528 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.528 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:07.528 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.528 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:07.528 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.528 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:07.528 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.528 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:07.529 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.529 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:07.529 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.529 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:07.529 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.529 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:07.529 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.529 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:07.529 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.529 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Create Usages Table
19:09:07.530 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.532 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:07.532 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:07.534 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.534 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:07.536 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
19:09:07.536 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.536 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:07.536 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.536 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:07.536 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.537 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:07.537 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
19:09:07.537 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.537 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:07.537 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.537 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:07.538 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.539 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:07.540 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:07.541 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.541 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:07.542 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.543 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:07.544 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:07.544 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:07.544 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:07.545 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:07.546 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 13 migrations to schema "public" (execution time 00:00.130s)
19:09:07.548 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 44 of 229M
19:09:07.577 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Log4jLoggerProvider
19:09:07.577 [main] INFO org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 6.1.0.Final
19:09:07.582 [main] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.
19:09:07.592 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@297ea53a
19:09:07.593 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
19:09:07.593 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
19:09:07.595 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@3a320ade
19:09:07.596 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@21005f6c
19:09:07.598 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
19:09:07.599 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
19:09:07.600 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
19:09:07.600 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
19:09:07.632 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
19:09:07.717 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
19:09:07.723 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
19:09:07.724 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
19:09:07.724 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
19:09:07.724 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
19:09:07.724 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
19:09:07.754 [main] DEBUG org.eclipse.jetty.util.log - Logging to Logger[org.eclipse.jetty.util.log] via org.eclipse.jetty.util.log.Slf4jLog
19:09:07.756 [main] INFO org.eclipse.jetty.util.log - Logging initialized @6334ms to org.eclipse.jetty.util.log.Slf4jLog
19:09:07.814 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@5aa6202e
19:09:07.818 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@5b69d40d{/,null,UNAVAILABLE} added {ServletHandler@71154f21{STOPPED},MANAGED}
19:09:07.820 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@347bdeef
19:09:07.821 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@2aa27288{/,null,UNAVAILABLE} added {ServletHandler@7f34a967{STOPPED},MANAGED}
19:09:08.558 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:08.559 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:08.560 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:08.560 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:08.560 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:08.560 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:08.560 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:08.560 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:08.561 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:08.569 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
19:09:08.606 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.036s)
19:09:08.607 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 96 of 311M
19:09:08.609 [log:pid(1874)] INFO pg-d449ad09-ce15-4004-92c3-9be25fb974fc - 2020-10-07 19:09:08.609 UTC [1878] LOG:  received fast shutdown request
19:09:08.709 [log:pid(1898)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:pg_ctl - waiting for server to shut down.... done
19:09:08.710 [log:pid(1898)] INFO init-d449ad09-ce15-4004-92c3-9be25fb974fc:pg_ctl - server stopped
19:09:08.710 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - d449ad09-ce15-4004-92c3-9be25fb974fc shut down postmaster in 00:00:00.103
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.121 s - in org.dataone.bookkeeper.jdbi.ProductStoreTest
[INFO] Running org.dataone.bookkeeper.jdbi.QuotaStoreTest
19:09:08.986 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - The files belonging to this database system will be owned by user "jenkins".
19:09:08.986 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - This user must also own the server process.
19:09:08.986 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - 
19:09:08.986 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
19:09:08.986 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - The default text search configuration will be set to "english".
19:09:08.986 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - 
19:09:08.986 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - Data page checksums are disabled.
19:09:08.986 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - 
19:09:08.986 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - fixing permissions on existing directory /tmp/epg980241957149302689 ... ok
19:09:09.035 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - creating subdirectories ... ok
19:09:09.047 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - selecting default max_connections ... 100
19:09:09.060 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - selecting default shared_buffers ... 128MB
19:09:09.060 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - selecting dynamic shared memory implementation ... posix
19:09:09.135 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - creating configuration files ... ok
19:09:09.275 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - running bootstrap script ... ok
19:09:09.780 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - performing post-bootstrap initialization ... ok
19:09:09.994 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - syncing data to disk ... ok
19:09:09.994 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - 
19:09:09.994 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - Success. You can now start the database server using:
19:09:09.994 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - 
19:09:09.994 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg980241957149302689 -l logfile start
19:09:09.994 [log:pid(1902)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:initdb - 
19:09:09.995 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 284c297c-cb4b-4069-8507-ad011f4412ce initdb completed in 00:00:01.018
19:09:09.998 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 284c297c-cb4b-4069-8507-ad011f4412ce postmaster started as java.lang.UNIXProcess@323f3c96 on port 5432.  Waiting up to PT10S for server startup to finish.
19:09:10.009 [log:pid(1918)] INFO pg-284c297c-cb4b-4069-8507-ad011f4412ce - waiting for server to start....2020-10-07 19:09:10.009 UTC [1922] LOG:  listening on IPv6 address "::1", port 5432
19:09:10.009 [log:pid(1918)] INFO pg-284c297c-cb4b-4069-8507-ad011f4412ce - 2020-10-07 19:09:10.009 UTC [1922] LOG:  listening on IPv4 address "127.0.0.1", port 5432
19:09:10.009 [log:pid(1918)] INFO pg-284c297c-cb4b-4069-8507-ad011f4412ce - 2020-10-07 19:09:10.009 UTC [1922] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
19:09:10.046 [log:pid(1918)] INFO pg-284c297c-cb4b-4069-8507-ad011f4412ce - 2020-10-07 19:09:10.046 UTC [1923] LOG:  database system was shut down at 2020-10-07 19:09:09 UTC
19:09:10.049 [log:pid(1918)] INFO pg-284c297c-cb4b-4069-8507-ad011f4412ce - 2020-10-07 19:09:10.049 UTC [1922] LOG:  database system is ready to accept connections
19:09:10.100 [log:pid(1918)] INFO pg-284c297c-cb4b-4069-8507-ad011f4412ce - 2020-10-07 19:09:10.100 UTC [1934] LOG:  incomplete startup packet
19:09:10.104 [log:pid(1918)] INFO pg-284c297c-cb4b-4069-8507-ad011f4412ce -  done
19:09:10.104 [log:pid(1918)] INFO pg-284c297c-cb4b-4069-8507-ad011f4412ce - server started
19:09:10.106 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 284c297c-cb4b-4069-8507-ad011f4412ce postmaster startup finished in 00:00:00.109
19:09:10.112 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
19:09:10.112 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
19:09:10.113 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:10.114 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:10.114 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:10.114 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:10.114 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:10.114 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:10.114 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:10.114 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:10.115 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:10.118 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
19:09:10.118 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
19:09:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Function_Update_Quota_Table_Usage.sql ...
19:09:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Usages_Add_Unique_Constraint.sql ...
19:09:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql ...
19:09:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
19:09:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 12: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Customers_Table.sql ...
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:10.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:10.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:10.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:10.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:10.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:10.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:10.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:10.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:10.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:10.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Create_Products_Table.sql ...
19:09:10.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:10.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:10.127 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Insert_Standard_Products.sql ...
19:09:10.127 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:10.128 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:10.129 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:10.129 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 64: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:10.130 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 84: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:10.130 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 104: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:10.131 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Create_Orders_Table.sql ...
19:09:10.131 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:10.131 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:10.131 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:10.131 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:10.131 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:10.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Alter_Quotas_Add_Order_FK.sql ...
19:09:10.133 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:10.133 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Alter_Orders_Add_Customer_FK.sql ...
19:09:10.133 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:10.133 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Create_Usages_Table.sql ...
19:09:10.133 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql (filename: V1.0__Create_Bookkeeper_Database.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.10__Create_Function_Update_Quota_Table_Usage.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.11__Alter_Usages_Add_Unique_Constraint.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql (filename: V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.1__Create_Quotas_Table.sql (filename: V1.1__Create_Quotas_Table.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.2__Insert_Standard_Quotas.sql (filename: V1.2__Insert_Standard_Quotas.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Customers_Table.sql (filename: V1.3__Create_Customers_Table.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Create_Products_Table.sql (filename: V1.4__Create_Products_Table.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Insert_Standard_Products.sql (filename: V1.5__Insert_Standard_Products.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Create_Orders_Table.sql (filename: V1.6__Create_Orders_Table.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql (filename: V1.7__Alter_Quotas_Add_Order_FK.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql (filename: V1.8__Alter_Orders_Add_Customer_FK.sql)
19:09:10.134 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Create_Usages_Table.sql (filename: V1.9__Create_Usages_Table.sql)
19:09:10.135 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 13 migrations (execution time 00:00.017s)
19:09:10.136 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
19:09:10.142 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
19:09:10.142 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
19:09:10.143 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 17: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:10.143 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:10.143 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:10.143 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:10.146 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.146 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:10.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:10.148 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.148 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
19:09:10.150 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
19:09:10.150 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
19:09:10.151 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
19:09:10.152 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.154 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
19:09:10.155 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:10.155 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.155 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:10.157 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.157 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:10.157 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.157 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:10.158 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.158 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:10.158 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.158 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:10.159 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.159 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:10.159 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.159 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:10.159 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.159 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:10.162 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.162 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
19:09:10.163 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.164 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
19:09:10.165 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:10.166 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:10.166 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:10.166 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:10.166 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:10.166 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:10.166 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
19:09:10.167 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.168 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Customers Table
19:09:10.169 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:10.169 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.169 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:10.171 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.171 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:10.171 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.171 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:10.175 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.175 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:10.175 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.175 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:10.175 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.175 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:10.175 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.175 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Customers Table
19:09:10.176 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.177 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Create Products Table
19:09:10.178 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:10.178 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.178 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:10.179 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.179 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:10.180 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.180 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:10.180 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.180 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:10.181 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.181 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:10.181 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.181 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:10.181 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.181 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.184 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Create Products Table
19:09:10.185 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.186 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Insert Standard Products
19:09:10.186 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:10.187 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:10.188 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:10.188 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:10.188 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:10.188 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:10.188 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:10.188 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:10.189 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:10.190 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:10.190 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:10.190 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:10.190 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Insert Standard Products
19:09:10.191 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.192 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Create Orders Table
19:09:10.192 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:10.193 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.193 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:10.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:10.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:10.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:10.199 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.199 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Create Orders Table
19:09:10.199 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.200 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:10.201 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:10.202 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.202 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:10.203 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.204 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:10.205 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:10.205 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.205 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:10.206 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.207 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Create Usages Table
19:09:10.208 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:10.208 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.208 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:10.209 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.209 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:10.210 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.210 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:10.210 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.210 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:10.210 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.210 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:10.211 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.211 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:10.211 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.211 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.212 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Create Usages Table
19:09:10.213 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.214 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:10.214 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:10.217 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
19:09:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:10.218 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.218 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:10.218 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
19:09:10.218 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.218 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:10.218 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.218 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:10.219 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.220 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:10.220 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:10.221 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.221 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:10.221 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.222 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:10.223 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:10.223 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:10.223 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:10.224 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:10.225 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 13 migrations to schema "public" (execution time 00:00.083s)
19:09:10.226 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 116 of 311M
19:09:10.229 [main] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.
19:09:10.230 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@297ea53a
19:09:10.230 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
19:09:10.230 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
19:09:10.230 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@3a320ade
19:09:10.230 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@21005f6c
19:09:10.230 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
19:09:10.230 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
19:09:10.230 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
19:09:10.231 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
19:09:10.231 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
19:09:10.235 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
19:09:10.235 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
19:09:10.235 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
19:09:10.235 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
19:09:10.235 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
19:09:10.235 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
19:09:10.236 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@48528634
19:09:10.236 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@5e1d03d7{/,null,UNAVAILABLE} added {ServletHandler@4047d2d9{STOPPED},MANAGED}
19:09:10.236 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@48d293ee
19:09:10.236 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@146dcfe6{/,null,UNAVAILABLE} added {ServletHandler@22587507{STOPPED},MANAGED}
19:09:11.283 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:11.283 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:11.283 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:11.283 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:11.284 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:11.284 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:11.284 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:11.284 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:11.285 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:11.290 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
19:09:11.312 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.022s)
19:09:11.313 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 105 of 354M
19:09:11.315 [log:pid(1918)] INFO pg-284c297c-cb4b-4069-8507-ad011f4412ce - 2020-10-07 19:09:11.315 UTC [1922] LOG:  received fast shutdown request
19:09:11.415 [log:pid(1950)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:pg_ctl - waiting for server to shut down.... done
19:09:11.415 [log:pid(1950)] INFO init-284c297c-cb4b-4069-8507-ad011f4412ce:pg_ctl - server stopped
19:09:11.416 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 284c297c-cb4b-4069-8507-ad011f4412ce shut down postmaster in 00:00:00.103
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.546 s - in org.dataone.bookkeeper.jdbi.QuotaStoreTest
[INFO] Running org.dataone.bookkeeper.jdbi.OrderStoreTest
19:09:11.532 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - The files belonging to this database system will be owned by user "jenkins".
19:09:11.532 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - This user must also own the server process.
19:09:11.532 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - 
19:09:11.532 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
19:09:11.532 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - The default text search configuration will be set to "english".
19:09:11.532 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - 
19:09:11.532 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - Data page checksums are disabled.
19:09:11.532 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - 
19:09:11.532 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - fixing permissions on existing directory /tmp/epg3513672652109073426 ... ok
19:09:11.533 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - creating subdirectories ... ok
19:09:11.544 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - selecting default max_connections ... 100
19:09:11.558 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - selecting default shared_buffers ... 128MB
19:09:11.558 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - selecting dynamic shared memory implementation ... posix
19:09:11.629 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - creating configuration files ... ok
19:09:11.799 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - running bootstrap script ... ok
19:09:12.241 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - performing post-bootstrap initialization ... ok
19:09:12.484 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - syncing data to disk ... ok
19:09:12.484 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - 
19:09:12.484 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - Success. You can now start the database server using:
19:09:12.484 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - 
19:09:12.484 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg3513672652109073426 -l logfile start
19:09:12.484 [log:pid(1952)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:initdb - 
19:09:12.485 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 2e554e65-fd5e-4573-a36c-9eb649ac801d initdb completed in 00:00:00.961
19:09:12.487 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 2e554e65-fd5e-4573-a36c-9eb649ac801d postmaster started as java.lang.UNIXProcess@77cb452c on port 5432.  Waiting up to PT10S for server startup to finish.
19:09:12.498 [log:pid(1973)] INFO pg-2e554e65-fd5e-4573-a36c-9eb649ac801d - waiting for server to start....2020-10-07 19:09:12.498 UTC [1977] LOG:  listening on IPv6 address "::1", port 5432
19:09:12.498 [log:pid(1973)] INFO pg-2e554e65-fd5e-4573-a36c-9eb649ac801d - 2020-10-07 19:09:12.498 UTC [1977] LOG:  listening on IPv4 address "127.0.0.1", port 5432
19:09:12.498 [log:pid(1973)] INFO pg-2e554e65-fd5e-4573-a36c-9eb649ac801d - 2020-10-07 19:09:12.498 UTC [1977] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
19:09:12.535 [log:pid(1973)] INFO pg-2e554e65-fd5e-4573-a36c-9eb649ac801d - 2020-10-07 19:09:12.535 UTC [1978] LOG:  database system was shut down at 2020-10-07 19:09:12 UTC
19:09:12.537 [log:pid(1973)] INFO pg-2e554e65-fd5e-4573-a36c-9eb649ac801d - 2020-10-07 19:09:12.537 UTC [1977] LOG:  database system is ready to accept connections
19:09:12.589 [log:pid(1973)] INFO pg-2e554e65-fd5e-4573-a36c-9eb649ac801d - 2020-10-07 19:09:12.589 UTC [1985] LOG:  incomplete startup packet
19:09:12.593 [log:pid(1973)] INFO pg-2e554e65-fd5e-4573-a36c-9eb649ac801d -  done
19:09:12.593 [log:pid(1973)] INFO pg-2e554e65-fd5e-4573-a36c-9eb649ac801d - server started
19:09:12.594 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 2e554e65-fd5e-4573-a36c-9eb649ac801d postmaster startup finished in 00:00:00.109
19:09:12.602 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
19:09:12.602 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
19:09:12.602 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:12.603 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:12.603 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:12.603 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:12.603 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:12.603 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:12.603 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:12.603 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:12.604 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:12.607 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
19:09:12.607 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
19:09:12.608 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Function_Update_Quota_Table_Usage.sql ...
19:09:12.608 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:12.608 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:12.608 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:12.608 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:12.608 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:12.608 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:12.609 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Usages_Add_Unique_Constraint.sql ...
19:09:12.609 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:12.609 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql ...
19:09:12.609 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:12.609 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
19:09:12.609 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:12.610 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 12: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Customers_Table.sql ...
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:12.611 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Create_Products_Table.sql ...
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:12.612 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:12.613 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:12.613 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:12.613 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:12.613 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:12.613 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:12.613 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:12.613 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:12.613 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:12.613 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Insert_Standard_Products.sql ...
19:09:12.613 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:12.614 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:12.614 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:12.615 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 64: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:12.615 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 84: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:12.616 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 104: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:12.616 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Create_Orders_Table.sql ...
19:09:12.616 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Alter_Quotas_Add_Order_FK.sql ...
19:09:12.617 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Alter_Orders_Add_Customer_FK.sql ...
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Create_Usages_Table.sql ...
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:12.618 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql (filename: V1.0__Create_Bookkeeper_Database.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.10__Create_Function_Update_Quota_Table_Usage.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.11__Alter_Usages_Add_Unique_Constraint.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql (filename: V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.1__Create_Quotas_Table.sql (filename: V1.1__Create_Quotas_Table.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.2__Insert_Standard_Quotas.sql (filename: V1.2__Insert_Standard_Quotas.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Customers_Table.sql (filename: V1.3__Create_Customers_Table.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Create_Products_Table.sql (filename: V1.4__Create_Products_Table.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Insert_Standard_Products.sql (filename: V1.5__Insert_Standard_Products.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Create_Orders_Table.sql (filename: V1.6__Create_Orders_Table.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql (filename: V1.7__Alter_Quotas_Add_Order_FK.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql (filename: V1.8__Alter_Orders_Add_Customer_FK.sql)
19:09:12.619 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Create_Usages_Table.sql (filename: V1.9__Create_Usages_Table.sql)
19:09:12.619 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 13 migrations (execution time 00:00.012s)
19:09:12.620 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
19:09:12.624 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
19:09:12.624 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
19:09:12.624 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 17: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:12.624 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:12.624 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:12.624 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:12.627 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.627 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:12.628 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.628 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:12.628 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.628 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
19:09:12.630 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
19:09:12.630 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
19:09:12.630 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
19:09:12.632 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.633 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
19:09:12.634 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:12.634 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.634 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:12.636 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.636 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:12.636 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.636 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:12.636 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.636 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:12.637 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.637 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:12.637 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.637 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:12.637 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.637 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:12.637 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.637 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.638 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:12.639 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.639 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:12.639 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.639 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
19:09:12.640 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.641 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
19:09:12.642 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:12.643 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:12.643 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:12.643 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:12.643 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:12.643 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:12.643 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
19:09:12.644 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.645 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Customers Table
19:09:12.646 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:12.646 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.646 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:12.647 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.647 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:12.648 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.648 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:12.648 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.648 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:12.648 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.648 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:12.648 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.648 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:12.649 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.650 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:12.651 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.651 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Customers Table
19:09:12.651 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.652 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Create Products Table
19:09:12.653 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:12.653 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.653 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:12.654 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.654 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:12.655 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.655 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:12.655 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.655 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:12.655 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.655 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.656 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.657 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:12.658 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.658 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:12.658 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.658 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:12.658 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.658 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Create Products Table
19:09:12.658 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.659 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Insert Standard Products
19:09:12.660 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:12.661 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:12.661 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:12.661 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:12.661 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:12.661 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:12.661 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:12.662 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:12.662 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:12.662 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:12.662 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:12.662 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:12.662 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Insert Standard Products
19:09:12.663 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.664 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Create Orders Table
19:09:12.665 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:12.665 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.665 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:12.666 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.666 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:12.667 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.667 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:12.667 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.667 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:12.667 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.667 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.668 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.669 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:12.670 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.670 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:12.670 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.670 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:12.670 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.670 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Create Orders Table
19:09:12.670 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.671 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:12.672 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:12.673 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.673 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:12.674 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.675 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:12.675 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:12.676 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.676 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:12.677 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.677 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Create Usages Table
19:09:12.678 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:12.678 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.678 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:12.679 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.679 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:12.680 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.680 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:12.680 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.680 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:12.681 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.681 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:12.681 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.682 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Create Usages Table
19:09:12.683 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.684 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:12.685 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:12.686 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.686 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:12.686 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
19:09:12.686 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.686 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:12.686 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.686 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:12.687 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.687 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:12.687 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
19:09:12.687 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.687 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:12.687 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.687 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:12.688 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.689 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:12.689 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:12.689 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.689 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:12.690 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.691 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:12.691 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:12.692 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:12.692 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:12.692 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:12.693 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 13 migrations to schema "public" (execution time 00:00.070s)
19:09:12.694 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 126 of 354M
19:09:12.697 [main] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.
19:09:12.697 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@297ea53a
19:09:12.697 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
19:09:12.697 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
19:09:12.697 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@3a320ade
19:09:12.698 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@21005f6c
19:09:12.698 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
19:09:12.698 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
19:09:12.698 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
19:09:12.698 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
19:09:12.698 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
19:09:12.701 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
19:09:12.702 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
19:09:12.702 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
19:09:12.702 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
19:09:12.702 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
19:09:12.702 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
19:09:12.702 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@62aeddc8
19:09:12.703 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@11787b64{/,null,UNAVAILABLE} added {ServletHandler@5707f613{STOPPED},MANAGED}
19:09:12.703 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@77b3752b
19:09:12.703 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@6367a688{/,null,UNAVAILABLE} added {ServletHandler@319642db{STOPPED},MANAGED}
19:09:12.909 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:12.909 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:12.909 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:12.909 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:12.910 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:12.911 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:12.915 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
19:09:12.936 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.021s)
19:09:12.936 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 237 of 354M
19:09:12.938 [log:pid(1973)] INFO pg-2e554e65-fd5e-4573-a36c-9eb649ac801d - 2020-10-07 19:09:12.938 UTC [1977] LOG:  received fast shutdown request
19:09:13.038 [log:pid(1993)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:pg_ctl - waiting for server to shut down.... done
19:09:13.039 [log:pid(1993)] INFO init-2e554e65-fd5e-4573-a36c-9eb649ac801d:pg_ctl - server stopped
19:09:13.039 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 2e554e65-fd5e-4573-a36c-9eb649ac801d shut down postmaster in 00:00:00.102
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.32 s - in org.dataone.bookkeeper.jdbi.OrderStoreTest
[INFO] Running org.dataone.bookkeeper.jdbi.UsageStoreTest
19:09:13.859 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - The files belonging to this database system will be owned by user "jenkins".
19:09:13.859 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - This user must also own the server process.
19:09:13.859 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - 
19:09:13.859 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
19:09:13.859 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - The default text search configuration will be set to "english".
19:09:13.859 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - 
19:09:13.859 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - Data page checksums are disabled.
19:09:13.859 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - 
19:09:13.859 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - fixing permissions on existing directory /tmp/epg7709504685688765030 ... ok
19:09:13.859 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - creating subdirectories ... ok
19:09:13.868 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - selecting default max_connections ... 100
19:09:13.882 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - selecting default shared_buffers ... 128MB
19:09:13.882 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - selecting dynamic shared memory implementation ... posix
19:09:13.959 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - creating configuration files ... ok
19:09:14.079 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - running bootstrap script ... ok
19:09:14.527 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - performing post-bootstrap initialization ... ok
19:09:14.744 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - syncing data to disk ... ok
19:09:14.744 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - 
19:09:14.744 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - Success. You can now start the database server using:
19:09:14.744 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - 
19:09:14.744 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg7709504685688765030 -l logfile start
19:09:14.744 [log:pid(1995)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:initdb - 
19:09:14.745 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - aa856162-12a0-4332-b00f-28004e0f3419 initdb completed in 00:00:00.894
19:09:14.747 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - aa856162-12a0-4332-b00f-28004e0f3419 postmaster started as java.lang.UNIXProcess@74a820bf on port 5432.  Waiting up to PT10S for server startup to finish.
19:09:14.759 [log:pid(2011)] INFO pg-aa856162-12a0-4332-b00f-28004e0f3419 - waiting for server to start....2020-10-07 19:09:14.759 UTC [2015] LOG:  listening on IPv6 address "::1", port 5432
19:09:14.759 [log:pid(2011)] INFO pg-aa856162-12a0-4332-b00f-28004e0f3419 - 2020-10-07 19:09:14.759 UTC [2015] LOG:  listening on IPv4 address "127.0.0.1", port 5432
19:09:14.759 [log:pid(2011)] INFO pg-aa856162-12a0-4332-b00f-28004e0f3419 - 2020-10-07 19:09:14.759 UTC [2015] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
19:09:14.798 [log:pid(2011)] INFO pg-aa856162-12a0-4332-b00f-28004e0f3419 - 2020-10-07 19:09:14.798 UTC [2016] LOG:  database system was shut down at 2020-10-07 19:09:14 UTC
19:09:14.801 [log:pid(2011)] INFO pg-aa856162-12a0-4332-b00f-28004e0f3419 - 2020-10-07 19:09:14.801 UTC [2015] LOG:  database system is ready to accept connections
19:09:14.849 [log:pid(2011)] INFO pg-aa856162-12a0-4332-b00f-28004e0f3419 - 2020-10-07 19:09:14.849 UTC [2023] LOG:  incomplete startup packet
19:09:14.853 [log:pid(2011)] INFO pg-aa856162-12a0-4332-b00f-28004e0f3419 -  done
19:09:14.853 [log:pid(2011)] INFO pg-aa856162-12a0-4332-b00f-28004e0f3419 - server started
19:09:14.856 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - aa856162-12a0-4332-b00f-28004e0f3419 postmaster startup finished in 00:00:00.110
19:09:14.863 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
19:09:14.863 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
19:09:14.863 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:14.864 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:14.864 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:14.864 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:14.864 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:14.865 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:14.866 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:14.869 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
19:09:14.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
19:09:14.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Function_Update_Quota_Table_Usage.sql ...
19:09:14.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:14.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:14.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:14.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:14.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:14.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:14.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Usages_Add_Unique_Constraint.sql ...
19:09:14.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:14.872 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql ...
19:09:14.872 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:14.872 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:14.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:14.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:14.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:14.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:14.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:14.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:14.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
19:09:14.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:14.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:14.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 12: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:14.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Customers_Table.sql ...
19:09:14.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:14.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:14.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:14.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:14.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:14.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:14.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:14.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:14.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:14.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Create_Products_Table.sql ...
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:14.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:14.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:14.880 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Insert_Standard_Products.sql ...
19:09:14.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:14.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:14.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:14.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 64: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:14.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 84: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:14.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 104: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:14.885 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Create_Orders_Table.sql ...
19:09:14.885 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:14.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:14.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Alter_Quotas_Add_Order_FK.sql ...
19:09:14.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:14.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Alter_Orders_Add_Customer_FK.sql ...
19:09:14.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:14.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Create_Usages_Table.sql ...
19:09:14.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:14.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:14.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:14.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:14.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:14.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:14.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:14.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:14.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:14.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql (filename: V1.0__Create_Bookkeeper_Database.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.10__Create_Function_Update_Quota_Table_Usage.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.11__Alter_Usages_Add_Unique_Constraint.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql (filename: V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.1__Create_Quotas_Table.sql (filename: V1.1__Create_Quotas_Table.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.2__Insert_Standard_Quotas.sql (filename: V1.2__Insert_Standard_Quotas.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Customers_Table.sql (filename: V1.3__Create_Customers_Table.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Create_Products_Table.sql (filename: V1.4__Create_Products_Table.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Insert_Standard_Products.sql (filename: V1.5__Insert_Standard_Products.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Create_Orders_Table.sql (filename: V1.6__Create_Orders_Table.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql (filename: V1.7__Alter_Quotas_Add_Order_FK.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql (filename: V1.8__Alter_Orders_Add_Customer_FK.sql)
19:09:14.890 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Create_Usages_Table.sql (filename: V1.9__Create_Usages_Table.sql)
19:09:14.891 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 13 migrations (execution time 00:00.022s)
19:09:14.892 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
19:09:14.896 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
19:09:14.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
19:09:14.897 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 17: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:14.897 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:14.897 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:14.897 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:14.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:14.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:14.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.901 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
19:09:14.903 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
19:09:14.903 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
19:09:14.904 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
19:09:14.905 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.906 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
19:09:14.906 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:14.907 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.907 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:14.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:14.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:14.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:14.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:14.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:14.925 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.925 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:14.925 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.925 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:14.925 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.925 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:14.925 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.925 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:14.925 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.925 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.926 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
19:09:14.927 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.928 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
19:09:14.929 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:14.930 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:14.930 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:14.930 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:14.930 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:14.930 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:14.930 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
19:09:14.931 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.932 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Customers Table
19:09:14.932 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:14.933 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.933 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:14.934 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.934 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:14.934 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.934 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:14.935 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.935 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:14.935 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.935 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:14.935 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.935 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:14.935 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.935 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:14.938 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.938 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:14.938 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.938 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Customers Table
19:09:14.938 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.939 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Create Products Table
19:09:14.940 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:14.940 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.940 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:14.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:14.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:14.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:14.943 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.943 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:14.943 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.943 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:14.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:14.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:14.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:14.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:14.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:14.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:14.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:14.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:14.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:14.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.946 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Create Products Table
19:09:14.947 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.948 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Insert Standard Products
19:09:14.948 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:14.949 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:14.949 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:14.949 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:14.949 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:14.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:14.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:14.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:14.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:14.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:14.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:14.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:14.951 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Insert Standard Products
19:09:14.952 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.953 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Create Orders Table
19:09:14.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:14.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:14.955 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.955 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:14.955 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.955 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:14.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:14.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.958 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.959 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Create Orders Table
19:09:14.960 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.961 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:14.961 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:14.963 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.963 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:14.964 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.964 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:14.965 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:14.966 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.966 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:14.966 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.967 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Create Usages Table
19:09:14.968 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:14.968 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.968 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:14.969 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.969 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:14.969 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.969 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:14.970 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.970 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:14.970 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.970 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:14.971 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.971 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:14.971 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.971 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:14.971 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.971 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:14.971 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.971 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:14.972 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.972 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:14.972 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.972 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:14.972 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.972 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:14.972 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.972 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:14.972 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.972 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Create Usages Table
19:09:14.973 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.974 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:14.974 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:14.975 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.975 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:14.976 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
19:09:14.976 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.976 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:14.976 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.976 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:14.976 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.976 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:14.977 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
19:09:14.977 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.977 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:14.977 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.977 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:14.978 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.979 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:14.979 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:14.980 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.980 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:14.981 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.982 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:14.982 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:14.983 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:14.983 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:14.984 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:14.985 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 13 migrations to schema "public" (execution time 00:00.089s)
19:09:14.985 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 257 of 354M
19:09:14.990 [main] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.
19:09:14.990 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@297ea53a
19:09:14.990 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
19:09:14.990 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
19:09:14.991 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@3a320ade
19:09:14.991 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@21005f6c
19:09:14.991 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
19:09:14.991 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
19:09:14.991 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
19:09:14.992 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
19:09:14.992 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
19:09:14.996 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
19:09:14.997 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
19:09:14.997 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
19:09:14.997 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
19:09:14.997 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
19:09:14.997 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
19:09:14.998 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@78c74647
19:09:14.998 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@39652a30{/,null,UNAVAILABLE} added {ServletHandler@5763a655{STOPPED},MANAGED}
19:09:14.998 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@40c8067
19:09:14.998 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@46bb0bdf{/,null,UNAVAILABLE} added {ServletHandler@561f9d92{STOPPED},MANAGED}
19:09:15.209 [log:pid(2011)] INFO pg-aa856162-12a0-4332-b00f-28004e0f3419 - 2020-10-07 19:09:15.209 UTC [2029] ERROR:  duplicate key value violates unique constraint "usages_quotaid_instanceid_idx"
19:09:15.422 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:15.422 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:15.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:15.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:15.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:15.423 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:15.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:15.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:15.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:15.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:15.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:15.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:15.424 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:15.428 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
19:09:15.450 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.022s)
19:09:15.451 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 221 of 439M
19:09:15.653 [log:pid(2031)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:pg_ctl - waiting for server to shut down.... done
19:09:15.654 [log:pid(2031)] INFO init-aa856162-12a0-4332-b00f-28004e0f3419:pg_ctl - server stopped
19:09:15.654 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - aa856162-12a0-4332-b00f-28004e0f3419 shut down postmaster in 00:00:00.203
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.99 s - in org.dataone.bookkeeper.jdbi.UsageStoreTest
[INFO] Running org.dataone.bookkeeper.jdbi.CustomerStoreTest
19:09:15.850 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - The files belonging to this database system will be owned by user "jenkins".
19:09:15.850 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - This user must also own the server process.
19:09:15.850 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - 
19:09:15.850 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
19:09:15.850 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - The default text search configuration will be set to "english".
19:09:15.850 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - 
19:09:15.850 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - Data page checksums are disabled.
19:09:15.850 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - 
19:09:15.850 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - fixing permissions on existing directory /tmp/epg3630168061025266369 ... ok
19:09:15.850 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - creating subdirectories ... ok
19:09:15.860 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - selecting default max_connections ... 100
19:09:15.874 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - selecting default shared_buffers ... 128MB
19:09:15.874 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - selecting dynamic shared memory implementation ... posix
19:09:15.954 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - creating configuration files ... ok
19:09:16.067 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - running bootstrap script ... ok
19:09:16.506 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - performing post-bootstrap initialization ... ok
19:09:16.683 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - syncing data to disk ... ok
19:09:16.683 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - 
19:09:16.683 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - Success. You can now start the database server using:
19:09:16.683 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - 
19:09:16.683 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg3630168061025266369 -l logfile start
19:09:16.683 [log:pid(2033)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:initdb - 
19:09:16.684 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 17b35f62-d851-4ab1-b53e-a871b7bbb380 initdb completed in 00:00:00.842
19:09:16.686 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 17b35f62-d851-4ab1-b53e-a871b7bbb380 postmaster started as java.lang.UNIXProcess@3a4f8e8a on port 5432.  Waiting up to PT10S for server startup to finish.
19:09:16.696 [log:pid(2061)] INFO pg-17b35f62-d851-4ab1-b53e-a871b7bbb380 - waiting for server to start....2020-10-07 19:09:16.696 UTC [2065] LOG:  listening on IPv6 address "::1", port 5432
19:09:16.696 [log:pid(2061)] INFO pg-17b35f62-d851-4ab1-b53e-a871b7bbb380 - 2020-10-07 19:09:16.696 UTC [2065] LOG:  listening on IPv4 address "127.0.0.1", port 5432
19:09:16.697 [log:pid(2061)] INFO pg-17b35f62-d851-4ab1-b53e-a871b7bbb380 - 2020-10-07 19:09:16.696 UTC [2065] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
19:09:16.733 [log:pid(2061)] INFO pg-17b35f62-d851-4ab1-b53e-a871b7bbb380 - 2020-10-07 19:09:16.733 UTC [2066] LOG:  database system was shut down at 2020-10-07 19:09:16 UTC
19:09:16.735 [log:pid(2061)] INFO pg-17b35f62-d851-4ab1-b53e-a871b7bbb380 - 2020-10-07 19:09:16.735 UTC [2065] LOG:  database system is ready to accept connections
19:09:16.787 [log:pid(2061)] INFO pg-17b35f62-d851-4ab1-b53e-a871b7bbb380 - 2020-10-07 19:09:16.787 UTC [2074] LOG:  incomplete startup packet
19:09:16.791 [log:pid(2061)] INFO pg-17b35f62-d851-4ab1-b53e-a871b7bbb380 -  done
19:09:16.791 [log:pid(2061)] INFO pg-17b35f62-d851-4ab1-b53e-a871b7bbb380 - server started
19:09:16.807 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 17b35f62-d851-4ab1-b53e-a871b7bbb380 postmaster startup finished in 00:00:00.123
19:09:16.814 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
19:09:16.814 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
19:09:16.814 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:16.815 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:16.815 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:16.815 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:16.815 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:16.816 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:16.819 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
19:09:16.819 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
19:09:16.819 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Function_Update_Quota_Table_Usage.sql ...
19:09:16.820 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:16.820 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:16.820 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:16.820 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:16.820 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:16.820 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:16.820 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Usages_Add_Unique_Constraint.sql ...
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql ...
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:16.821 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 12: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Customers_Table.sql ...
19:09:16.822 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Create_Products_Table.sql ...
19:09:16.823 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:16.824 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Insert_Standard_Products.sql ...
19:09:16.825 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:16.825 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:16.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:16.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 64: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:16.827 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 84: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:16.827 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 104: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:16.827 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Create_Orders_Table.sql ...
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:16.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:16.829 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Alter_Quotas_Add_Order_FK.sql ...
19:09:16.829 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:16.829 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Alter_Orders_Add_Customer_FK.sql ...
19:09:16.829 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:16.829 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Create_Usages_Table.sql ...
19:09:16.829 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql (filename: V1.0__Create_Bookkeeper_Database.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.10__Create_Function_Update_Quota_Table_Usage.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.11__Alter_Usages_Add_Unique_Constraint.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql (filename: V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.1__Create_Quotas_Table.sql (filename: V1.1__Create_Quotas_Table.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.2__Insert_Standard_Quotas.sql (filename: V1.2__Insert_Standard_Quotas.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Customers_Table.sql (filename: V1.3__Create_Customers_Table.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Create_Products_Table.sql (filename: V1.4__Create_Products_Table.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Insert_Standard_Products.sql (filename: V1.5__Insert_Standard_Products.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Create_Orders_Table.sql (filename: V1.6__Create_Orders_Table.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql (filename: V1.7__Alter_Quotas_Add_Order_FK.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql (filename: V1.8__Alter_Orders_Add_Customer_FK.sql)
19:09:16.830 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Create_Usages_Table.sql (filename: V1.9__Create_Usages_Table.sql)
19:09:16.838 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 13 migrations (execution time 00:00.018s)
19:09:16.838 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
19:09:16.842 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
19:09:16.843 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
19:09:16.843 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 17: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:16.843 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:16.843 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:16.843 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:16.846 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.846 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:16.846 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.846 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:16.847 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.847 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
19:09:16.851 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
19:09:16.851 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
19:09:16.851 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
19:09:16.852 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.853 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
19:09:16.854 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:16.855 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.855 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:16.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:16.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:16.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:16.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:16.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:16.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:16.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:16.861 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.861 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:16.861 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.861 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:16.861 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.861 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
19:09:16.862 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.863 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
19:09:16.864 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:16.864 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:16.864 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:16.865 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:16.865 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:16.865 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:16.865 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
19:09:16.866 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.866 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Customers Table
19:09:16.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:16.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:16.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:16.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:16.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:16.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.871 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:16.872 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.872 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:16.872 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.872 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Customers Table
19:09:16.872 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.873 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Create Products Table
19:09:16.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:16.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:16.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:16.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:16.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:16.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:16.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:16.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:16.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:16.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.879 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Create Products Table
19:09:16.880 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.881 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Insert Standard Products
19:09:16.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:16.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:16.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:16.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:16.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:16.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:16.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:16.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:16.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:16.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:16.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:16.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:16.884 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Insert Standard Products
19:09:16.885 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.885 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Create Orders Table
19:09:16.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:16.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.886 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:16.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:16.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:16.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:16.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:16.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:16.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:16.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.892 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:16.892 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.892 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:16.892 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.892 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Create Orders Table
19:09:16.892 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.893 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:16.894 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:16.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.895 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:16.896 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.897 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:16.897 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:16.898 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.898 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:16.899 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.899 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Create Usages Table
19:09:16.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:16.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:16.902 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.902 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:16.902 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.902 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:16.902 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.902 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:16.903 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.903 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:16.903 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.903 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:16.903 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.904 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Create Usages Table
19:09:16.905 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.906 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:16.906 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:16.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:16.908 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
19:09:16.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:16.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:16.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:16.909 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
19:09:16.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:16.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.909 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:16.910 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.910 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:16.911 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:16.911 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.911 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:16.912 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.913 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:16.913 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:16.914 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:16.914 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:16.914 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:16.916 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 13 migrations to schema "public" (execution time 00:00.073s)
19:09:16.916 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 244 of 439M
19:09:16.920 [main] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.
19:09:16.920 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@297ea53a
19:09:16.920 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
19:09:16.920 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
19:09:16.921 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@3a320ade
19:09:16.921 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@21005f6c
19:09:16.921 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
19:09:16.921 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
19:09:16.921 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
19:09:16.922 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
19:09:16.922 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
19:09:16.926 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
19:09:16.926 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
19:09:16.926 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
19:09:16.926 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
19:09:16.927 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
19:09:16.927 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
19:09:16.927 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@1aaf46e6
19:09:16.928 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@391d28ea{/,null,UNAVAILABLE} added {ServletHandler@23df7fad{STOPPED},MANAGED}
19:09:16.928 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@4ab455e2
19:09:16.928 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@2acca224{/,null,UNAVAILABLE} added {ServletHandler@7ac685ef{STOPPED},MANAGED}
19:09:17.902 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:17.903 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:17.903 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:17.903 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:17.903 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:17.903 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:17.904 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:17.905 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:17.909 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
19:09:17.947 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.037s)
19:09:17.947 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 315 of 439M
19:09:17.956 [log:pid(2061)] INFO pg-17b35f62-d851-4ab1-b53e-a871b7bbb380 - 2020-10-07 19:09:17.956 UTC [2065] LOG:  received fast shutdown request
19:09:18.056 [log:pid(2082)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:pg_ctl - waiting for server to shut down.... done
19:09:18.056 [log:pid(2082)] INFO init-17b35f62-d851-4ab1-b53e-a871b7bbb380:pg_ctl - server stopped
19:09:18.056 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 17b35f62-d851-4ab1-b53e-a871b7bbb380 shut down postmaster in 00:00:00.108
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.379 s - in org.dataone.bookkeeper.jdbi.CustomerStoreTest
[INFO] Running org.dataone.bookkeeper.EmbeddedPostgresqlTest
19:09:18.233 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - The files belonging to this database system will be owned by user "jenkins".
19:09:18.233 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - This user must also own the server process.
19:09:18.233 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - 
19:09:18.233 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
19:09:18.233 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - The default text search configuration will be set to "english".
19:09:18.233 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - 
19:09:18.233 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - Data page checksums are disabled.
19:09:18.233 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - 
19:09:18.233 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - fixing permissions on existing directory /tmp/epg5404794160925658618 ... ok
19:09:18.233 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - creating subdirectories ... ok
19:09:18.242 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - selecting default max_connections ... 100
19:09:18.256 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - selecting default shared_buffers ... 128MB
19:09:18.256 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - selecting dynamic shared memory implementation ... posix
19:09:18.325 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - creating configuration files ... ok
19:09:18.452 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - running bootstrap script ... ok
19:09:18.980 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - performing post-bootstrap initialization ... ok
19:09:19.210 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - syncing data to disk ... ok
19:09:19.211 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - 
19:09:19.211 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - Success. You can now start the database server using:
19:09:19.211 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - 
19:09:19.211 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg5404794160925658618 -l logfile start
19:09:19.211 [log:pid(2086)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:initdb - 
19:09:19.211 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 13c5fc00-cdda-48ac-9326-400e3ed2ef65 initdb completed in 00:00:00.986
19:09:19.213 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 13c5fc00-cdda-48ac-9326-400e3ed2ef65 postmaster started as java.lang.UNIXProcess@45b8bbbf on port 5432.  Waiting up to PT10S for server startup to finish.
19:09:19.224 [log:pid(2102)] INFO pg-13c5fc00-cdda-48ac-9326-400e3ed2ef65 - waiting for server to start....2020-10-07 19:09:19.224 UTC [2106] LOG:  listening on IPv6 address "::1", port 5432
19:09:19.224 [log:pid(2102)] INFO pg-13c5fc00-cdda-48ac-9326-400e3ed2ef65 - 2020-10-07 19:09:19.224 UTC [2106] LOG:  listening on IPv4 address "127.0.0.1", port 5432
19:09:19.224 [log:pid(2102)] INFO pg-13c5fc00-cdda-48ac-9326-400e3ed2ef65 - 2020-10-07 19:09:19.224 UTC [2106] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
19:09:19.262 [log:pid(2102)] INFO pg-13c5fc00-cdda-48ac-9326-400e3ed2ef65 - 2020-10-07 19:09:19.262 UTC [2107] LOG:  database system was shut down at 2020-10-07 19:09:18 UTC
19:09:19.265 [log:pid(2102)] INFO pg-13c5fc00-cdda-48ac-9326-400e3ed2ef65 - 2020-10-07 19:09:19.265 UTC [2106] LOG:  database system is ready to accept connections
19:09:19.315 [log:pid(2102)] INFO pg-13c5fc00-cdda-48ac-9326-400e3ed2ef65 - 2020-10-07 19:09:19.315 UTC [2114] LOG:  incomplete startup packet
19:09:19.319 [log:pid(2102)] INFO pg-13c5fc00-cdda-48ac-9326-400e3ed2ef65 -  done
19:09:19.319 [log:pid(2102)] INFO pg-13c5fc00-cdda-48ac-9326-400e3ed2ef65 - server started
19:09:19.321 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 13c5fc00-cdda-48ac-9326-400e3ed2ef65 postmaster startup finished in 00:00:00.109
19:09:19.327 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
19:09:19.327 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
19:09:19.328 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:19.328 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:19.328 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:19.328 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:19.329 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:19.330 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:19.333 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
19:09:19.333 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
19:09:19.334 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Function_Update_Quota_Table_Usage.sql ...
19:09:19.335 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:19.335 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:19.335 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:19.335 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:19.336 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:19.336 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:19.336 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Usages_Add_Unique_Constraint.sql ...
19:09:19.336 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:19.337 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql ...
19:09:19.337 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:19.337 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
19:09:19.337 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 23: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:19.338 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:19.339 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:19.339 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
19:09:19.339 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:19.340 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:19.340 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 12: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:19.340 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Customers_Table.sql ...
19:09:19.340 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:19.341 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:19.341 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:19.341 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:19.341 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:19.341 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:19.341 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:19.341 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:19.341 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:19.341 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:19.341 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:19.342 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:19.343 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Create_Products_Table.sql ...
19:09:19.343 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:19.343 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:19.343 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:19.343 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:19.343 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:19.343 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:19.344 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:19.345 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:19.345 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:19.345 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:19.345 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Insert_Standard_Products.sql ...
19:09:19.346 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 3: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:20.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:20.025 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:20.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 64: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:20.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 84: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:20.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 104: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:20.029 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Create_Orders_Table.sql ...
19:09:20.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:20.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:20.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:20.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:20.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:20.032 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:20.032 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:20.032 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:20.032 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:20.032 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:20.032 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:20.032 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:20.033 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Alter_Quotas_Add_Order_FK.sql ...
19:09:20.033 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:20.034 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Alter_Orders_Add_Customer_FK.sql ...
19:09:20.034 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:20.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Create_Usages_Table.sql ...
19:09:20.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:20.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:20.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:20.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:20.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:20.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:20.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:20.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:20.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:20.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:20.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:20.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:20.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:20.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql (filename: V1.0__Create_Bookkeeper_Database.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.10__Create_Function_Update_Quota_Table_Usage.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.11__Alter_Usages_Add_Unique_Constraint.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql (filename: V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.1__Create_Quotas_Table.sql (filename: V1.1__Create_Quotas_Table.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.2__Insert_Standard_Quotas.sql (filename: V1.2__Insert_Standard_Quotas.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Customers_Table.sql (filename: V1.3__Create_Customers_Table.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Create_Products_Table.sql (filename: V1.4__Create_Products_Table.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Insert_Standard_Products.sql (filename: V1.5__Insert_Standard_Products.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Create_Orders_Table.sql (filename: V1.6__Create_Orders_Table.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql (filename: V1.7__Alter_Quotas_Add_Order_FK.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql (filename: V1.8__Alter_Orders_Add_Customer_FK.sql)
19:09:20.037 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Create_Usages_Table.sql (filename: V1.9__Create_Usages_Table.sql)
19:09:20.038 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 13 migrations (execution time 00:00.705s)
19:09:20.039 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
19:09:20.044 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
19:09:20.044 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
19:09:20.045 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 17: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:20.045 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:20.045 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:20.045 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE "public"."flyway_schema_history" (
    "installed_rank" INT NOT NULL,
    "version" VARCHAR(50),
    "description" VARCHAR(200) NOT NULL,
    "type" VARCHAR(20) NOT NULL,
    "script" VARCHAR(1000) NOT NULL,
    "checksum" INTEGER,
    "installed_by" VARCHAR(100) NOT NULL,
    "installed_on" TIMESTAMP NOT NULL DEFAULT now(),
    "execution_time" INTEGER NOT NULL,
    "success" BOOLEAN NOT NULL
)
19:09:20.051 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.051 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE "public"."flyway_schema_history" ADD CONSTRAINT "flyway_schema_history_pk" PRIMARY KEY ("installed_rank")
19:09:20.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
19:09:20.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.053 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
19:09:20.055 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
19:09:20.055 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
19:09:20.056 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
19:09:20.057 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.058 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
19:09:20.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
19:09:20.060 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.060 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS quotas (
    id integer DEFAULT nextval('quotas_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaType text NOT NULL,
    softLimit double precision NOT NULL,
    hardLimit double precision NOT NULL,
    totalUsage double precision,
    unit text NOT NULL,
    orderId integer,
    subject text,
    name text
)
19:09:20.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
19:09:20.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
19:09:20.066 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.066 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_orderId_idx ON quotas USING btree(orderId)
19:09:20.067 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.067 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_subject_idx ON quotas USING btree(subject)
19:09:20.067 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.067 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
19:09:20.068 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.068 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
19:09:20.068 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.068 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
19:09:20.068 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.068 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
19:09:20.068 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.068 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
19:09:20.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
19:09:20.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
19:09:20.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
19:09:20.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.orderId IS 'The order id to which the quota is applied.'
19:09:20.070 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.070 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.subject IS 'The subject identifier to which the quota is applied.'
19:09:20.070 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.070 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.name IS 'The quota name, copied from the order name.'
19:09:20.070 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.070 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
19:09:20.071 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.072 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
19:09:20.073 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
19:09:20.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:20.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1TB base hosted repository storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
19:09:20.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:20.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, orderId, subject)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
19:09:20.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:20.074 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
19:09:20.075 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.076 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Customers Table
19:09:20.077 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
19:09:20.077 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.077 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS customers (
    id integer DEFAULT nextval('customers_id_seq') PRIMARY KEY,
    object text NOT NULL,
    subject text NOT NULL,
    balance integer,
    address json,
    created timestamp with time zone,
    currency text,
    delinquent boolean,
    description text,
    discount json,
    email text,
    invoicePrefix text,
    invoiceSettings json,
    metadata json,
    givenName text,
    surName text,
    phone text
)
19:09:20.079 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.079 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
19:09:20.079 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.079 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
19:09:20.079 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.079 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
19:09:20.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
19:09:20.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
19:09:20.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
19:09:20.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
19:09:20.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.balance IS 'The customer balance, in the smallest unit of the currency (i.e. USD cents).'
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.address IS 'The customer address, stored as a JSON address object.'
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
19:09:20.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.082 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.discount IS 'The customer discount, stored as a JSON Discount object.'
19:09:20.082 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.082 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
19:09:20.082 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.082 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
19:09:20.082 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.082 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoiceSettings IS 'The customer settings, stored as a JSON InvoiceSettings object'
19:09:20.082 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.082 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.metadata IS 'The customer metadata, stored as a JSON object (undefined as of yet)'
19:09:20.082 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
19:09:20.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
19:09:20.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
19:09:20.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.083 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Customers Table
19:09:20.084 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.085 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Create Products Table
19:09:20.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
19:09:20.086 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.086 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS products (
    id integer DEFAULT nextval('products_id_seq') PRIMARY KEY,
    object text NOT NULL,
    active boolean,
    amount integer NOT NULL,
    name text,
    caption text,
    currency text NOT NULL,
    description text,
    interval text NOT NULL,
    created timestamp with time zone,
    statementDescriptor text,
    type text,
    unitLabel text,
    url text,
    metadata json
)
19:09:20.087 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.087 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
19:09:20.087 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.087 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
19:09:20.088 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.088 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
19:09:20.088 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.088 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
19:09:20.089 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.089 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
19:09:20.089 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.089 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
19:09:20.089 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.active IS 'The active status for the product, true or false.'
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.amount IS 'The cost amount for the product, in pence of the currency'
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
19:09:20.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.currency IS 'The product currency as a 3-letter ISO currency code.'
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
19:09:20.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
19:09:20.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.metadata IS 'The product metadata JSON object, currently a feature list.'
19:09:20.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.092 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Create Products Table
19:09:20.093 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.094 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Insert Standard Products
19:09:20.094 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Individual Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    32000,
    'Faculty or research lab',
    now(),
    'USD',
    'Create a customized portal for your work and projects. Help others understand and access your data.',
    'year',
    'Individual',
    'DataONE Membership Plan - Individual',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "1","hardLimit": "1","totalUsage": "0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:20.095 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:20.095 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Small Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    200000,
    'Small institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Small Organization',
    'DataONE Membership Plan - Small Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "5","hardLimit": "5","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:20.096 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:20.096 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Medium Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    600000,
    'Medium institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Medium Organization',
    'DataONE Membership Plan - Medium Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "portal","softLimit": "15","hardLimit": "15","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:20.096 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:20.096 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Large Organization Membership
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    true,
    2800000,
    'Large institutions or groups',
    now(),
    'USD',
    'Create multiple portals for your work and projects. Help others understand and access your data.',
    'year',
    'Large Organization',
    'DataONE Membership Plan - Large Organization',
    'service',
    'membership',
    'https://products.dataone.org/plus',
    '{"features": [{"name": "branded_portal","label": "Branded Portals","description": "Showcase your research, data, results, and usage metrics by building a custom web portal.","quota": {"object": "quota","quotaType": "branded_portal","softLimit": "50","hardLimit": "50","totalUsage":"0","unit": "portal"}},{"name": "custom_search_filters","label": "Custom Search Filters","description": "Create custom search filters in your portal to allow scientists to search your holdings using filters appropriate to your field of science."},{"name": "fair_data_assessment","label": "FAIR Data Assessments","description": "Access quality metric reports using the FAIR data suite of checks."},{"name": "custom_quality_service","label": "Custom Quality Metrics","description": "Create a suite of custom quality metadata checks specific to your datasets."},{"name": "aggregated_metrics","label": "Aggregated Metrics","description": "Access and share reports on aggregated usage metrics such as dataset views, data downloads, and dataset citations."},{"name": "dataone_voting_member","label": "DataONE Voting Member","description": "Vote on the direction and priorities at DataONE Community meetings."}]}'
)
19:09:20.096 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:20.097 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Hosted Repository
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    1200000,
    'A dedicated repository solution for your group or institution’s data, managed by DataONE',
    now(),
    'USD',
    'Bring the products of your research lab, field station, or library together in a centralized location for efficient sharing, access, and reuse. Accelerate research activity, foster new collaborations, and build community with a repository that meets your needs and reflects your brand.',
    'year',
    'DataONE Hosted Repository',
    'DataONE Hosted Repository',
    'service',
    'repository',
    'https://products.dataone.org/hostedrepo',
    '{"features": [{"name": "trusted_data_repository","label": "A Trusted Data Repository","description": "Preserve and share your data, software, and derived products in a dedicated repository system. Built on our robust and expertly managed repository software and hardware, your research products are safely inactive and easily accessible."},{"name": "individual_fair_Assessments","label": "Individual FAIR Assessments","description": "Evaluate your metadata with community established FAIR principles. Scores are refreshed with updates to your metadata, helping make your data even more Findable, Accessible, Interoperable, and Reusable."},{"name": "powerful_online_submission","label": "Powerful Online Submission","description": "The user friendly data submission tool helps your researchers efficiently upload and describe their data. Users can easily create detailed metadata to enhance interoperability, reusability, and value of data."},{"name": "comprehensive_search","label": "Comprehensive Search","description": "Quickly find data with detailed search filters, or by navigating the interactive map."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "usage_metrics","label": "Usage Metrics","description": "Understand how your data are being used over time with view, download, and citation metrics."},{"name": "expandable_storage","label": "Expandable Storage","description": "Grow your repository capacity based on your storage needs in 1 TB increments.","quota": {"object": "quota","quotaType": "repository_storage","softLimit": 1048576,"hardLimit": 1153434,"totalUsage": 0,"unit": "portal"}},{"name": "geographic_replicas","label": "Geographic Replicas","description": "Your data are replicated to distinct geographic regions for high availability and preservation."},{"name": "api_access","label": "API Access","description": "Programmatically work with your repository through the DataONE tools in R, Python, Matlab, and Java."},{"name": "link_data_and_software","label": "Link data and Software","description": "Easily show how your files relate to each other by providing well-described provenance workflows."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "private_and_public_access","label": "Private and Public Access","description": "Control access to your datasets\nprior to publication with private groups or just yourself."},{"name": "any_file_format","label": "Any File Format","description": "Use the scientific file formats for your community: image, tabular, text, audio, video, and others."},{"name": "share_when_ready","label": "Share When Ready","description": "Keep your dataset private while you document it thoroughly, and then make it public when you are ready."}]}'
)
19:09:20.115 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:20.115 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Archival Storage
INSERT INTO products (object, active, amount, caption, created, currency, description,
    interval, name, statementDescriptor, type, unitLabel, url, metadata)
VALUES (
    'product',
    'true',
    126000,
    'Additional High Availability Data Storage',
    now(),
    'USD',
    'Increase the available storage in your dedicated hosted repository in 1 TB increments.',
    'year',
    'Additional Data Storage',
    'Additional Data Storage',
    'service',
    'storage',
    'https://products.dataone.org/hostedrepo',
    '{}'
)
19:09:20.115 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
19:09:20.116 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Insert Standard Products
19:09:20.116 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.117 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Create Orders Table
19:09:20.118 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
19:09:20.118 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS orders (
    id integer DEFAULT nextval('orders_id_seq') PRIMARY KEY,
    object text NOT NULL,
    amount integer,
    amountReturned integer,
    charge json,
    created timestamp with time zone,
    currency text,
    customer integer,
    subject text,
    email text,
    items json,
    metadata json,
    name text,
    status text,
    statusTransitions json,
    updated timestamp with time zone,
    seriesId text,
    startDate timestamp with time zone,
    endDate timestamp with time zone
)
19:09:20.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
19:09:20.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_subject_idx ON orders USING btree(subject)
19:09:20.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
19:09:20.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
19:09:20.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
19:09:20.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.subject IS 'The order user or group subject identifier.'
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.name IS 'The order name set by the customer.'
19:09:20.124 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.seriesId IS 'The order series identifier to track renewals.'
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.startDate IS 'The order services start date.'
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.endDate IS 'The order services end date.'
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.125 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Create Orders Table
19:09:20.126 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.127 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:20.127 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the order id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_order_id_fk
    FOREIGN KEY (orderId) REFERENCES orders (id) ON DELETE CASCADE
19:09:20.129 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.129 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Alter Quotas Add Order FK
19:09:20.130 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.130 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:20.131 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE orders
    ADD CONSTRAINT orders_customer_id_fk
    FOREIGN KEY (customer) REFERENCES customers (id) ON DELETE CASCADE
19:09:20.132 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.132 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Alter Orders Add Customer FK
19:09:20.185 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.186 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Create Usages Table
19:09:20.187 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
19:09:20.188 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.188 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS usages (
    id integer DEFAULT nextval('usages_id_seq') PRIMARY KEY,
    object text NOT NULL,
    quotaId integer NOT NULL,
    instanceId text NOT NULL,
    quantity double precision NOT NULL,
    status text,
    nodeId text NOT NULL
)
19:09:20.189 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.189 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
19:09:20.189 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.190 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
19:09:20.190 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.190 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
19:09:20.190 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.190 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER TABLE usages
    ADD CONSTRAINT usages_quotas_id_fk
    FOREIGN KEY (quotaId) REFERENCES quotas (id) ON DELETE CASCADE
19:09:20.192 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.192 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  usages IS 'Usages records each instance a portion of a quota is used.'
19:09:20.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
19:09:20.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
19:09:20.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
19:09:20.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.instanceId IS 'The instance identifier using a portion of the quota.'
19:09:20.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quantity IS 'The quantity used by the instance, in the quota units.'
19:09:20.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
19:09:20.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
19:09:20.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.195 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Create Usages Table
19:09:20.196 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.197 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:20.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota usage function for inserts and updates
CREATE OR REPLACE FUNCTION update_quota_usage_on_insert_or_update()
    RETURNS trigger
    AS $update_quota_usage_on_insert_or_update$
    BEGIN
        -- Check that quotaId is given
        IF NEW.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.totalUsage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = NEW.quotaId)
                WHERE q.id = NEW.quotaId;
        RETURN NEW;
    END;
    $update_quota_usage_on_insert_or_update$
    LANGUAGE plpgsql
19:09:20.200 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.200 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_insert_or_update ON usages
19:09:20.201 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
19:09:20.201 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.201 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_insert_or_update AFTER INSERT OR UPDATE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_insert_or_update()
19:09:20.201 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.201 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage function for deletes
CREATE OR REPLACE FUNCTION update_quota_usage_on_delete()
    RETURNS trigger
    AS $update_quota_usage_on_delete$
    BEGIN
        -- Check that quotaId is given
        IF OLD.quotaId IS NULL THEN
            RAISE EXCEPTION 'quotaId cannot be null';
        END IF;

        -- Update the quotas.usage column
        UPDATE quotas q
            SET totalUsage = (SELECT SUM(u.quantity) FROM usages u WHERE u.status != 'inactive' AND u.quotaId = OLD.quotaId)
                WHERE q.id = OLD.quotaId;
        RETURN OLD;
    END;
    $update_quota_usage_on_delete$
    LANGUAGE plpgsql
19:09:20.201 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.201 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the update quota totalUsage trigger
DROP TRIGGER IF EXISTS update_quotas_usage_on_delete ON usages
19:09:20.202 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
19:09:20.202 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.202 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TRIGGER update_quotas_usage_on_delete AFTER DELETE ON usages
    FOR EACH ROW
        EXECUTE PROCEDURE update_quota_usage_on_delete()
19:09:20.202 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.202 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Function Update Quota Table Usage
19:09:20.203 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.204 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:20.204 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the usage table for the 'quotaid' + 'instanceid' columns
CREATE UNIQUE INDEX usages_quotaid_instanceid_idx
    ON usages USING btree(quotaid,instanceid)
19:09:20.205 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.205 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Usages Add Unique Constraint
19:09:20.206 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.207 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:20.207 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the orderId and quotaType columns
CREATE UNIQUE INDEX quotas_order_id_quota_type_idx
    ON quotas USING btree(orderId, quotaType)
19:09:20.208 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
19:09:20.208 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Alter Quotas Add Unique Constraint OrderId QuotaType
19:09:20.209 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
19:09:20.210 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 13 migrations to schema "public" (execution time 00:00.166s)
19:09:20.210 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 339 of 439M
19:09:20.215 [main] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.
19:09:20.215 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@297ea53a
19:09:20.216 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
19:09:20.216 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
19:09:20.216 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@3a320ade
19:09:20.216 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@21005f6c
19:09:20.217 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
19:09:20.217 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
19:09:20.217 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
19:09:20.217 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
19:09:20.221 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
19:09:20.225 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
19:09:20.225 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
19:09:20.225 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
19:09:20.225 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
19:09:20.225 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
19:09:20.225 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
19:09:20.226 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@3e2772a9
19:09:20.227 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@4449b273{/,null,UNAVAILABLE} added {ServletHandler@1fa18f87{STOPPED},MANAGED}
19:09:20.227 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@1d9bd1d6
19:09:20.227 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@18ac4af6{/,null,UNAVAILABLE} added {ServletHandler@117fb9ba{STOPPED},MANAGED}
19:09:20.250 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
19:09:20.251 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
19:09:20.251 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
19:09:20.251 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
19:09:20.251 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
19:09:20.252 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
19:09:20.252 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning starting at classpath root in filesystem: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/
19:09:20.252 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.FileSystemClassPathLocationScanner - Scanning for resources in path: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations (db/migrations)
19:09:20.252 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
19:09:20.252 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Function_Update_Quota_Table_Usage.sql
19:09:20.252 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Usages_Add_Unique_Constraint.sql
19:09:20.252 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Alter_Quotas_Add_Unique_Constraint_OrderId_QuotaType.sql
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Customers_Table.sql
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Create_Products_Table.sql
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Insert_Standard_Products.sql
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Create_Orders_Table.sql
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Alter_Quotas_Add_Order_FK.sql
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Alter_Orders_Add_Customer_FK.sql
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Create_Usages_Table.sql
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
19:09:20.253 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
19:09:20.259 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
19:09:20.283 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.024s)
19:09:20.284 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 339 of 439M
19:09:20.287 [log:pid(2102)] INFO pg-13c5fc00-cdda-48ac-9326-400e3ed2ef65 - 2020-10-07 19:09:20.286 UTC [2106] LOG:  received fast shutdown request
19:09:20.387 [log:pid(2121)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:pg_ctl - waiting for server to shut down.... done
19:09:20.387 [log:pid(2121)] INFO init-13c5fc00-cdda-48ac-9326-400e3ed2ef65:pg_ctl - server stopped
19:09:20.387 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 13c5fc00-cdda-48ac-9326-400e3ed2ef65 shut down postmaster in 00:00:00.103
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.226 s - in org.dataone.bookkeeper.EmbeddedPostgresqlTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 64, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[JENKINS] Recording test results
[INFO] 
[INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) @ bookkeeper ---
[INFO] Building jar: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/bookkeeper-0.1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-shade-plugin:3.2.1:shade (default) @ bookkeeper ---
[INFO] Including io.dropwizard:dropwizard-core:jar:2.0.0 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-util:jar:2.0.0 in the shaded jar.
[INFO] Including com.fasterxml.jackson.core:jackson-annotations:jar:2.10.1 in the shaded jar.
[INFO] Including com.google.guava:guava:jar:28.1-jre in the shaded jar.
[INFO] Including com.google.guava:failureaccess:jar:1.0.1 in the shaded jar.
[INFO] Including com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava in the shaded jar.
[INFO] Including com.google.j2objc:j2objc-annotations:jar:1.3 in the shaded jar.
[INFO] Including org.codehaus.mojo:animal-sniffer-annotations:jar:1.18 in the shaded jar.
[INFO] Including com.google.code.findbugs:jsr305:jar:3.0.2 in the shaded jar.
[INFO] Including joda-time:joda-time:jar:2.10.5 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-jackson:jar:2.0.0 in the shaded jar.
[INFO] Including com.fasterxml.jackson.core:jackson-core:jar:2.10.1 in the shaded jar.
[INFO] Including com.fasterxml.jackson.core:jackson-databind:jar:2.10.1 in the shaded jar.
[INFO] Including com.fasterxml.jackson.datatype:jackson-datatype-guava:jar:2.10.1 in the shaded jar.
[INFO] Including com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.10.1 in the shaded jar.
[INFO] Including com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.10.1 in the shaded jar.
[INFO] Including com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.10.1 in the shaded jar.
[INFO] Including com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.10.1 in the shaded jar.
[INFO] Including com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.10.1 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-validation:jar:2.0.0 in the shaded jar.
[INFO] Including org.hibernate.validator:hibernate-validator:jar:6.1.0.Final in the shaded jar.
[INFO] Including jakarta.validation:jakarta.validation-api:jar:2.0.2 in the shaded jar.
[INFO] Including org.jboss.logging:jboss-logging:jar:3.3.2.Final in the shaded jar.
[INFO] Including com.fasterxml:classmate:jar:1.3.4 in the shaded jar.
[INFO] Including org.glassfish:jakarta.el:jar:3.0.3 in the shaded jar.
[INFO] Including org.javassist:javassist:jar:3.26.0-GA in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-configuration:jar:2.0.0 in the shaded jar.
[INFO] Including com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.10.1 in the shaded jar.
[INFO] Including org.yaml:snakeyaml:jar:1.24 in the shaded jar.
[INFO] Including org.apache.commons:commons-text:jar:1.8 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-logging:jar:2.0.0 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-logback:jar:4.1.2 in the shaded jar.
[INFO] Including org.slf4j:jul-to-slf4j:jar:1.7.29 in the shaded jar.
[INFO] Including ch.qos.logback:logback-core:jar:1.2.3 in the shaded jar.
[INFO] Including ch.qos.logback:logback-classic:jar:1.2.3 in the shaded jar.
[INFO] Including io.dropwizard.logback:logback-throttling-appender:jar:1.1.0 in the shaded jar.
[INFO] Including org.slf4j:log4j-over-slf4j:jar:1.7.29 in the shaded jar.
[INFO] Including org.eclipse.jetty:jetty-util:jar:9.4.24.v20191120 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-metrics:jar:2.0.0 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-jersey:jar:2.0.0 in the shaded jar.
[INFO] Including org.glassfish.jersey.core:jersey-server:jar:2.29.1 in the shaded jar.
[INFO] Including org.glassfish.jersey.core:jersey-common:jar:2.29.1 in the shaded jar.
[INFO] Including org.glassfish.hk2:osgi-resource-locator:jar:1.0.3 in the shaded jar.
[INFO] Including jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6 in the shaded jar.
[INFO] Including org.glassfish.jersey.media:jersey-media-jaxb:jar:2.29.1 in the shaded jar.
[INFO] Including jakarta.annotation:jakarta.annotation-api:jar:1.3.5 in the shaded jar.
[INFO] Including org.glassfish.hk2.external:jakarta.inject:jar:2.6.1 in the shaded jar.
[INFO] Including org.glassfish.jersey.ext:jersey-metainf-services:jar:2.29.1 in the shaded jar.
[INFO] Including org.glassfish.jersey.ext:jersey-bean-validation:jar:2.29.1 in the shaded jar.
[INFO] Including org.glassfish.jersey.inject:jersey-hk2:jar:2.29.1 in the shaded jar.
[INFO] Including org.glassfish.hk2:hk2-locator:jar:2.6.1 in the shaded jar.
[INFO] Including org.glassfish.hk2.external:aopalliance-repackaged:jar:2.6.1 in the shaded jar.
[INFO] Including org.glassfish.hk2:hk2-api:jar:2.6.1 in the shaded jar.
[INFO] Including org.glassfish.hk2:hk2-utils:jar:2.6.1 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-jersey2:jar:4.1.2 in the shaded jar.
[INFO] Including com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.10.1 in the shaded jar.
[INFO] Including com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.10.1 in the shaded jar.
[INFO] Including com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.10.1 in the shaded jar.
[INFO] Including jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2 in the shaded jar.
[INFO] Including jakarta.activation:jakarta.activation-api:jar:1.2.1 in the shaded jar.
[INFO] Including org.glassfish.jersey.containers:jersey-container-servlet:jar:2.29.1 in the shaded jar.
[INFO] Including org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.29.1 in the shaded jar.
[INFO] Including org.eclipse.jetty:jetty-server:jar:9.4.24.v20191120 in the shaded jar.
[INFO] Including javax.servlet:javax.servlet-api:jar:3.1.0 in the shaded jar.
[INFO] Including org.eclipse.jetty:jetty-io:jar:9.4.24.v20191120 in the shaded jar.
[INFO] Including org.eclipse.jetty:jetty-webapp:jar:9.4.24.v20191120 in the shaded jar.
[INFO] Including org.eclipse.jetty:jetty-xml:jar:9.4.24.v20191120 in the shaded jar.
[INFO] Including org.eclipse.jetty:jetty-continuation:jar:9.4.24.v20191120 in the shaded jar.
[INFO] Including javax.xml.bind:jaxb-api:jar:2.3.1 in the shaded jar.
[INFO] Including javax.activation:javax.activation-api:jar:1.2.0 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-servlets:jar:2.0.0 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-annotation:jar:4.1.2 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-jetty:jar:2.0.0 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-jetty9:jar:4.1.2 in the shaded jar.
[INFO] Including org.eclipse.jetty:jetty-servlet:jar:9.4.24.v20191120 in the shaded jar.
[INFO] Including org.eclipse.jetty:jetty-security:jar:9.4.24.v20191120 in the shaded jar.
[INFO] Including org.eclipse.jetty:jetty-servlets:jar:9.4.24.v20191120 in the shaded jar.
[INFO] Including org.eclipse.jetty:jetty-http:jar:9.4.24.v20191120 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-lifecycle:jar:2.0.0 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-core:jar:4.1.2 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-jvm:jar:4.1.2 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-jmx:jar:4.1.2 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-servlets:jar:4.1.2 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-json:jar:4.1.2 in the shaded jar.
[INFO] Including com.helger:profiler:jar:1.1.1 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-healthchecks:jar:4.1.2 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-request-logging:jar:2.0.0 in the shaded jar.
[INFO] Including ch.qos.logback:logback-access:jar:1.2.3 in the shaded jar.
[INFO] Including net.sourceforge.argparse4j:argparse4j:jar:0.8.1 in the shaded jar.
[INFO] Including org.eclipse.jetty.toolchain.setuid:jetty-setuid-java:jar:1.0.3 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-json-logging:jar:2.0.0 in the shaded jar.
[INFO] Including org.glassfish.jersey.core:jersey-client:jar:2.29.1 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-jdbi3:jar:2.0.0 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-db:jar:2.0.0 in the shaded jar.
[INFO] Including org.apache.tomcat:tomcat-jdbc:jar:9.0.29 in the shaded jar.
[INFO] Including org.apache.tomcat:tomcat-juli:jar:9.0.29 in the shaded jar.
[INFO] Including org.jdbi:jdbi3-core:jar:3.11.1 in the shaded jar.
[INFO] Including org.antlr:antlr4-runtime:jar:4.7.2 in the shaded jar.
[INFO] Including io.leangen.geantyref:geantyref:jar:1.3.7 in the shaded jar.
[INFO] Including org.jdbi:jdbi3-sqlobject:jar:3.11.1 in the shaded jar.
[INFO] Including org.jdbi:jdbi3-jodatime2:jar:3.11.1 in the shaded jar.
[INFO] Including org.jdbi:jdbi3-guava:jar:3.11.1 in the shaded jar.
[INFO] Including io.dropwizard.metrics:metrics-jdbi3:jar:4.1.2 in the shaded jar.
[INFO] Including io.dropwizard:dropwizard-auth:jar:2.0.0 in the shaded jar.
[INFO] Including com.github.ben-manes.caffeine:caffeine:jar:2.8.0 in the shaded jar.
[INFO] Including org.checkerframework:checker-qual:jar:2.10.0 in the shaded jar.
[INFO] Including com.google.errorprone:error_prone_annotations:jar:2.3.3 in the shaded jar.
[INFO] Including org.postgresql:postgresql:jar:42.2.6 in the shaded jar.
[INFO] Including org.slf4j:slf4j-api:jar:1.7.25 in the shaded jar.
[INFO] Including org.apache.commons:commons-lang3:jar:3.7 in the shaded jar.
[INFO] Including commons-io:commons-io:jar:2.6 in the shaded jar.
[INFO] Including commons-codec:commons-codec:jar:1.11 in the shaded jar.
[INFO] Including org.slf4j:jcl-over-slf4j:jar:1.7.25 in the shaded jar.
[INFO] Including org.flywaydb:flyway-maven-plugin:jar:5.2.4 in the shaded jar.
[INFO] Including org.apache.maven:maven-plugin-api:jar:3.0 in the shaded jar.
[INFO] Including org.sonatype.sisu:sisu-inject-plexus:jar:1.4.2 in the shaded jar.
[INFO] Including org.sonatype.sisu:sisu-inject-bean:jar:1.4.2 in the shaded jar.
[INFO] Including org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7 in the shaded jar.
[INFO] Including org.apache.maven:maven-artifact:jar:3.0 in the shaded jar.
[INFO] Including org.apache.maven:maven-model:jar:3.0 in the shaded jar.
[INFO] Including org.apache.maven:maven-core:jar:3.0 in the shaded jar.
[INFO] Including org.apache.maven:maven-settings:jar:3.0 in the shaded jar.
[INFO] Including org.apache.maven:maven-settings-builder:jar:3.0 in the shaded jar.
[INFO] Including org.apache.maven:maven-repository-metadata:jar:3.0 in the shaded jar.
[INFO] Including org.apache.maven:maven-model-builder:jar:3.0 in the shaded jar.
[INFO] Including org.apache.maven:maven-aether-provider:jar:3.0 in the shaded jar.
[INFO] Including org.sonatype.aether:aether-impl:jar:1.7 in the shaded jar.
[INFO] Including org.sonatype.aether:aether-spi:jar:1.7 in the shaded jar.
[INFO] Including org.sonatype.aether:aether-api:jar:1.7 in the shaded jar.
[INFO] Including org.sonatype.aether:aether-util:jar:1.7 in the shaded jar.
[INFO] Including org.codehaus.plexus:plexus-interpolation:jar:1.14 in the shaded jar.
[INFO] Including org.codehaus.plexus:plexus-classworlds:jar:2.2.3 in the shaded jar.
[INFO] Including org.codehaus.plexus:plexus-component-annotations:jar:1.5.5 in the shaded jar.
[INFO] Including org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4 in the shaded jar.
[INFO] Including org.sonatype.plexus:plexus-cipher:jar:1.4 in the shaded jar.
[INFO] Including org.codehaus.plexus:plexus-utils:jar:1.5.15 in the shaded jar.
[INFO] Including org.flywaydb:flyway-core:jar:5.2.4 in the shaded jar.
[INFO] Including org.dataone:d1_libclient_java:jar:2.3.1 in the shaded jar.
[INFO] Including net.sf.jsignature.io-tools:easystream:jar:1.2.12 in the shaded jar.
[INFO] Including commons-collections:commons-collections:jar:3.2.1 in the shaded jar.
[INFO] Including javax.mail:mail:jar:1.4.1 in the shaded jar.
[INFO] Including javax.activation:activation:jar:1.1 in the shaded jar.
[INFO] Including org.jibx:jibx-run:jar:1.2.4.5 in the shaded jar.
[INFO] Including xpp3:xpp3:jar:1.1.3.4.O in the shaded jar.
[INFO] Including org.bouncycastle:bcpkix-jdk15on:jar:1.52 in the shaded jar.
[INFO] Including org.bouncycastle:bcprov-jdk15on:jar:1.52 in the shaded jar.
[INFO] Including commons-lang:commons-lang:jar:2.6 in the shaded jar.
[INFO] Including org.dataone:d1_common_java:jar:2.3.0 in the shaded jar.
[INFO] Including log4j:log4j:jar:1.2.17 in the shaded jar.
[INFO] Including org.apache.maven.plugins:maven-jar-plugin:maven-plugin:2.3.1 in the shaded jar.
[INFO] Including org.apache.maven:maven-project:jar:2.0.6 in the shaded jar.
[INFO] Including org.apache.maven:maven-profile:jar:2.0.6 in the shaded jar.
[INFO] Including org.apache.maven:maven-artifact-manager:jar:2.0.6 in the shaded jar.
[INFO] Including org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2 in the shaded jar.
[INFO] Including org.apache.maven:maven-plugin-registry:jar:2.0.6 in the shaded jar.
[INFO] Including org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 in the shaded jar.
[INFO] Including classworlds:classworlds:jar:1.1-alpha-2 in the shaded jar.
[INFO] Including org.apache.maven:maven-archiver:jar:2.4.1 in the shaded jar.
[INFO] Including org.codehaus.plexus:plexus-archiver:jar:1.0 in the shaded jar.
[INFO] Including org.codehaus.plexus:plexus-io:jar:1.0 in the shaded jar.
[INFO] Including org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.4.1 in the shaded jar.
[INFO] Including commons-fileupload:commons-fileupload:jar:1.3.1 in the shaded jar.
[INFO] Including org.apache.httpcomponents:httpmime:jar:4.3.3 in the shaded jar.
[INFO] Including org.apache.commons:commons-collections4:jar:4.0 in the shaded jar.
[INFO] Including commons-configuration:commons-configuration:jar:1.7 in the shaded jar.
[INFO] Including commons-digester:commons-digester:jar:1.8.1 in the shaded jar.
[INFO] Including commons-beanutils:commons-beanutils:jar:1.9.2 in the shaded jar.
[INFO] Including org.apache.httpcomponents:httpclient:jar:4.3.6 in the shaded jar.
[INFO] Including org.apache.httpcomponents:httpcore:jar:4.3.3 in the shaded jar.
[INFO] Including commons-logging:commons-logging:jar:1.1.3 in the shaded jar.
[INFO] Including org.apache.httpcomponents:httpclient-cache:jar:4.3.6 in the shaded jar.
[INFO] Including com.googlecode.foresite-toolkit:foresite:jar:1.0-SNAPSHOT in the shaded jar.
[INFO] Including com.hp.hpl.jena:jena:jar:2.5.5 in the shaded jar.
[INFO] Including com.hp.hpl.jena:arq:jar:2.2 in the shaded jar.
[INFO] Including org.apache.lucene:lucene-core:jar:2.2.0 in the shaded jar.
[INFO] Including com.hp.hpl.jena:arq-extra:jar:2.2 in the shaded jar.
[INFO] Including com.hp.hpl.jena:jenatest:jar:2.5.5 in the shaded jar.
[INFO] Including com.hp.hpl.jena:iri:jar:0.5 in the shaded jar.
[INFO] Including antlr:antlr:jar:2.7.5 in the shaded jar.
[INFO] Including com.hp.hpl.jena:concurrent-jena:jar:1.3.2 in the shaded jar.
[INFO] Including com.ibm.icu:icu4j:jar:3.4.4 in the shaded jar.
[INFO] Including com.hp.hpl.jena:json-jena:jar:1.0 in the shaded jar.
[INFO] Including stax:stax-api:jar:1.0 in the shaded jar.
[INFO] Including org.codehaus.woodstox:wstx-asl:jar:3.0.0 in the shaded jar.
[INFO] Including xerces:xercesImpl:jar:2.7.1 in the shaded jar.
[INFO] Including xerces:xmlParserAPIs:jar:2.0.2 in the shaded jar.
[INFO] Including rome:rome:jar:0.9 in the shaded jar.
[INFO] Including jdom:jdom:jar:1.0 in the shaded jar.
[INFO] Including xalan:xalan:jar:2.7.0 in the shaded jar.
[INFO] Including xml-apis:xml-apis:jar:1.0.b2 in the shaded jar.
[INFO] Including commons-cli:commons-cli:jar:1.0 in the shaded jar.
[INFO] Including junit:junit:jar:4.12 in the shaded jar.
[INFO] Including org.hamcrest:hamcrest-core:jar:1.3 in the shaded jar.
[INFO] Including com.nimbusds:nimbus-jose-jwt:jar:7.9 in the shaded jar.
[INFO] Including com.github.stephenc.jcip:jcip-annotations:jar:1.0-1 in the shaded jar.
[INFO] Including net.minidev:json-smart:jar:2.3 in the shaded jar.
[INFO] Including net.minidev:accessors-smart:jar:1.2 in the shaded jar.
[INFO] Including org.ow2.asm:asm:jar:5.0.4 in the shaded jar.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] xercesImpl-2.7.1.jar, xmlParserAPIs-2.0.2.jar define 1 overlapping classes: 
[WARNING]   - org.w3c.dom.html.HTMLDOMImplementation
[WARNING] maven-project-2.0.6.jar, maven-core-3.0.jar define 12 overlapping classes: 
[WARNING]   - org.apache.maven.project.ProjectSorter
[WARNING]   - org.apache.maven.project.DefaultMavenProjectHelper
[WARNING]   - org.apache.maven.project.artifact.AttachedArtifact
[WARNING]   - org.apache.maven.project.artifact.ActiveProjectArtifact
[WARNING]   - org.apache.maven.project.MavenProject
[WARNING]   - org.apache.maven.project.path.PathTranslator
[WARNING]   - org.apache.maven.project.ProjectBuildingException
[WARNING]   - org.apache.maven.project.MavenProjectHelper
[WARNING]   - org.apache.maven.project.artifact.InvalidDependencyVersionException
[WARNING]   - org.apache.maven.project.artifact.ProjectArtifactMetadata
[WARNING]   - 2 more...
[WARNING] jakarta.inject-2.6.1.jar, sisu-inject-bean-1.4.2.jar define 6 overlapping classes: 
[WARNING]   - javax.inject.Inject
[WARNING]   - javax.inject.Singleton
[WARNING]   - javax.inject.Scope
[WARNING]   - javax.inject.Named
[WARNING]   - javax.inject.Provider
[WARNING]   - javax.inject.Qualifier
[WARNING] sisu-inject-plexus-1.4.2.jar, plexus-container-default-1.0-alpha-9-stable-1.jar define 78 overlapping classes: 
[WARNING]   - org.codehaus.plexus.component.configurator.MapOrientedComponentConfigurator
[WARNING]   - org.codehaus.plexus.configuration.PlexusConfigurationException
[WARNING]   - org.codehaus.plexus.component.configurator.ComponentConfigurator
[WARNING]   - org.codehaus.plexus.component.repository.ComponentRequirement
[WARNING]   - org.codehaus.plexus.component.configurator.converters.ComponentValueSetter
[WARNING]   - org.codehaus.plexus.component.factory.AbstractComponentFactory
[WARNING]   - org.codehaus.plexus.PlexusTestCase
[WARNING]   - org.codehaus.plexus.logging.Logger
[WARNING]   - org.codehaus.plexus.component.configurator.BasicComponentConfigurator
[WARNING]   - org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException
[WARNING]   - 68 more...
[WARNING] aopalliance-repackaged-2.6.1.jar, sisu-inject-bean-1.4.2.jar define 9 overlapping classes: 
[WARNING]   - org.aopalliance.intercept.ConstructorInterceptor
[WARNING]   - org.aopalliance.intercept.MethodInvocation
[WARNING]   - org.aopalliance.intercept.MethodInterceptor
[WARNING]   - org.aopalliance.intercept.Invocation
[WARNING]   - org.aopalliance.aop.AspectException
[WARNING]   - org.aopalliance.intercept.Interceptor
[WARNING]   - org.aopalliance.intercept.Joinpoint
[WARNING]   - org.aopalliance.aop.Advice
[WARNING]   - org.aopalliance.intercept.ConstructorInvocation
[WARNING] log4j-1.2.17.jar, log4j-over-slf4j-1.7.29.jar define 29 overlapping classes: 
[WARNING]   - org.apache.log4j.spi.OptionHandler
[WARNING]   - org.apache.log4j.spi.LoggerRepository
[WARNING]   - org.apache.log4j.NDC
[WARNING]   - org.apache.log4j.PatternLayout
[WARNING]   - org.apache.log4j.LogManager
[WARNING]   - org.apache.log4j.BasicConfigurator
[WARNING]   - org.apache.log4j.spi.ErrorHandler
[WARNING]   - org.apache.log4j.MDC
[WARNING]   - org.apache.log4j.AppenderSkeleton
[WARNING]   - org.apache.log4j.WriterAppender
[WARNING]   - 19 more...
[WARNING] xmlParserAPIs-2.0.2.jar, xml-apis-1.0.b2.jar define 127 overlapping classes: 
[WARNING]   - org.xml.sax.helpers.NamespaceSupport$Context
[WARNING]   - org.xml.sax.InputSource
[WARNING]   - org.w3c.dom.html.HTMLLinkElement
[WARNING]   - org.xml.sax.ext.LexicalHandler
[WARNING]   - org.w3c.dom.ProcessingInstruction
[WARNING]   - org.w3c.dom.NamedNodeMap
[WARNING]   - org.w3c.dom.html.HTMLBodyElement
[WARNING]   - org.w3c.dom.Entity
[WARNING]   - org.xml.sax.ErrorHandler
[WARNING]   - org.w3c.dom.html.HTMLMetaElement
[WARNING]   - 117 more...
[WARNING] jcl-over-slf4j-1.7.25.jar, commons-logging-1.1.3.jar define 6 overlapping classes: 
[WARNING]   - org.apache.commons.logging.impl.SimpleLog$1
[WARNING]   - org.apache.commons.logging.Log
[WARNING]   - org.apache.commons.logging.impl.SimpleLog
[WARNING]   - org.apache.commons.logging.LogConfigurationException
[WARNING]   - org.apache.commons.logging.impl.NoOpLog
[WARNING]   - org.apache.commons.logging.LogFactory
[WARNING] classworlds-1.1-alpha-2.jar, plexus-classworlds-2.2.3.jar define 11 overlapping classes: 
[WARNING]   - org.codehaus.classworlds.DefaultClassRealm
[WARNING]   - org.codehaus.classworlds.BytesURLStreamHandler
[WARNING]   - org.codehaus.classworlds.BytesURLConnection
[WARNING]   - org.codehaus.classworlds.Launcher
[WARNING]   - org.codehaus.classworlds.NoSuchRealmException
[WARNING]   - org.codehaus.classworlds.DuplicateRealmException
[WARNING]   - org.codehaus.classworlds.ClassRealm
[WARNING]   - org.codehaus.classworlds.ClassWorld
[WARNING]   - org.codehaus.classworlds.ClassWorldException
[WARNING]   - org.codehaus.classworlds.ConfigurationException
[WARNING]   - 1 more...
[WARNING] maven-artifact-manager-2.0.6.jar, maven-core-3.0.jar define 4 overlapping classes: 
[WARNING]   - org.apache.maven.artifact.repository.metadata.AbstractRepositoryMetadata
[WARNING]   - org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata
[WARNING]   - org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager
[WARNING]   - org.apache.maven.artifact.repository.metadata.RepositoryMetadata
[WARNING] jakarta.activation-api-1.2.1.jar, activation-1.1.jar, javax.activation-api-1.2.0.jar define 27 overlapping classes: 
[WARNING]   - javax.activation.ObjectDataContentHandler
[WARNING]   - javax.activation.DataContentHandlerFactory
[WARNING]   - javax.activation.DataContentHandler
[WARNING]   - javax.activation.CommandObject
[WARNING]   - javax.activation.SecuritySupport$2
[WARNING]   - javax.activation.FileTypeMap
[WARNING]   - javax.activation.CommandInfo
[WARNING]   - javax.activation.MailcapCommandMap
[WARNING]   - javax.activation.DataHandler$1
[WARNING]   - javax.activation.UnsupportedDataTypeException
[WARNING]   - 17 more...
[WARNING] jakarta.xml.bind-api-2.3.2.jar, jaxb-api-2.3.1.jar define 111 overlapping classes: 
[WARNING]   - javax.xml.bind.annotation.XmlValue
[WARNING]   - javax.xml.bind.annotation.XmlElement
[WARNING]   - javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
[WARNING]   - javax.xml.bind.ContextFinder
[WARNING]   - javax.xml.bind.ContextFinder$3
[WARNING]   - javax.xml.bind.annotation.XmlElementRefs
[WARNING]   - javax.xml.bind.helpers.DefaultValidationEventHandler
[WARNING]   - javax.xml.bind.ParseConversionEvent
[WARNING]   - javax.xml.bind.annotation.XmlSchema
[WARNING]   - javax.xml.bind.ValidationException
[WARNING]   - 101 more...
[WARNING] xpp3-1.1.3.4.O.jar, stax-api-1.0.jar define 1 overlapping classes: 
[WARNING]   - javax.xml.namespace.QName
[WARNING] jakarta.activation-api-1.2.1.jar, javax.activation-api-1.2.0.jar define 4 overlapping classes: 
[WARNING]   - javax.activation.CommandInfo$Beans$1
[WARNING]   - javax.activation.MailcapCommandMap$1
[WARNING]   - javax.activation.CommandInfo$Beans
[WARNING]   - javax.activation.MimetypesFileTypeMap$1
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/bookkeeper-0.1.0-SNAPSHOT.jar with /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/bookkeeper-0.1.0-SNAPSHOT-shaded.jar
[INFO] Dependency-reduced POM written at: /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/dependency-reduced-pom.xml
[INFO] 
[INFO] --- maven-install-plugin:3.0.0-M1:install (default-install) @ bookkeeper ---
[INFO] Installing /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/bookkeeper-0.1.0-SNAPSHOT.jar to /var/lib/jenkins/.m2/repository/org/dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-SNAPSHOT.jar
[INFO] Installing /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/dependency-reduced-pom.xml to /var/lib/jenkins/.m2/repository/org/dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-SNAPSHOT.pom
[INFO] 
[INFO] --- maven-install-plugin:3.0.0-M1:install-file (default) @ bookkeeper ---
[INFO] Installing /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/original-bookkeeper-0.1.0-SNAPSHOT.jar to /var/lib/jenkins/.m2/repository/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/bookkeeper-client-0.1.0-SNAPSHOT.jar
[INFO] Installing /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/pom.xml to /var/lib/jenkins/.m2/repository/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/bookkeeper-client-0.1.0-SNAPSHOT.pom
[INFO] 
[INFO] --- maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) @ bookkeeper ---
[INFO] Downloading from jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded from jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/maven-metadata.xml (774 B at 8.1 kB/s)
[INFO] Uploading to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-20201007.190929-22.jar
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-20201007.190929-22.jar (49 MB at 99 MB/s)
[INFO] Uploading to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-20201007.190929-22.pom
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-20201007.190929-22.pom (11 kB at 11 MB/s)
[INFO] Downloading from jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/maven-metadata.xml
[INFO] Downloaded from jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/maven-metadata.xml (319 B at 15 kB/s)
[INFO] Uploading to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/maven-metadata.xml
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/maven-metadata.xml (774 B at 387 kB/s)
[INFO] Uploading to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/maven-metadata.xml
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/maven-metadata.xml (319 B)
[INFO] 
[INFO] --- maven-deploy-plugin:3.0.0-M1:deploy-file (deploy-file) @ bookkeeper ---
[INFO] Downloading from jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded from jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/maven-metadata.xml (781 B at 22 kB/s)
[INFO] Uploading to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/bookkeeper-client-0.1.0-20201007.190929-22.jar
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/bookkeeper-client-0.1.0-20201007.190929-22.jar (90 kB at 5.6 MB/s)
[INFO] Uploading to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/bookkeeper-client-0.1.0-20201007.190929-22.pom
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/bookkeeper-client-0.1.0-20201007.190929-22.pom (13 kB at 13 MB/s)
[INFO] Downloading from jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/maven-metadata.xml
[INFO] Downloaded from jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/maven-metadata.xml (326 B at 13 kB/s)
[INFO] Uploading to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/maven-metadata.xml
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/maven-metadata.xml (781 B at 781 kB/s)
[INFO] Uploading to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/maven-metadata.xml
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/maven-metadata.xml (326 B at 163 kB/s)
Notifying upstream projects of job completion
Join notifier requires a CauseAction
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  35.559 s
[INFO] Finished at: 2020-10-07T19:09:30Z
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/dependency-reduced-pom.xml to org.dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-SNAPSHOT.pom
[JENKINS] Archiving /var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/bookkeeper-0.1.0-SNAPSHOT.jar to org.dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-SNAPSHOT.jar
channel stopped
Notifying upstream projects of job completion
Finished: SUCCESS