SuccessConsole Output

Established TCP socket on 38099
<===[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 dataone.org: http://maven.dataone.org/com/googlecode/foresite-toolkit/foresite/1.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloading from maven2-repository.dev.java.net: http://download.java.net/maven/2/com/googlecode/foresite-toolkit/foresite/1.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloading from Jibx Maven Repository: http://jibx.sourceforge.net/maven/com/googlecode/foresite-toolkit/foresite/1.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloading from sonatype.org: https://repository.sonatype.org/content/shadows/centralm1/com/googlecode/foresite-toolkit/foresite/1.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded from dataone.org: http://maven.dataone.org/com/googlecode/foresite-toolkit/foresite/1.0-SNAPSHOT/maven-metadata.xml (1.2 kB at 17 kB/s)
[INFO] Downloading from dataone.org: http://maven.dataone.org/net/minidev/json-smart/maven-metadata.xml
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/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 13 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 18 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ bookkeeper ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 41 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 24 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.478 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.026 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.007 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.008 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.011 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.03 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.006 s - in org.dataone.bookkeeper.api.UsageStatusTest
[INFO] Running org.dataone.bookkeeper.jdbi.MembershipStoreTest
03:53:57.697 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - Detected a Linux x86_64 system
03:53:57.770 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - Postgres binaries at /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca
03:53:57.824 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - The files belonging to this database system will be owned by user "jenkins".
03:53:57.824 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - This user must also own the server process.
03:53:57.824 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - 
03:53:57.838 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
03:53:57.838 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - The default text search configuration will be set to "english".
03:53:57.838 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - 
03:53:57.838 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - Data page checksums are disabled.
03:53:57.838 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - 
03:53:57.838 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - fixing permissions on existing directory /tmp/epg3929596550722859220 ... ok
03:53:57.839 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - creating subdirectories ... ok
03:53:57.857 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - selecting default max_connections ... 100
03:53:57.871 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - selecting default shared_buffers ... 128MB
03:53:57.871 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - selecting dynamic shared memory implementation ... posix
03:53:58.091 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - creating configuration files ... ok
03:53:58.221 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - running bootstrap script ... ok
03:53:58.725 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - performing post-bootstrap initialization ... ok
03:53:58.928 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - syncing data to disk ... ok
03:53:58.929 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - 
03:53:58.929 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - Success. You can now start the database server using:
03:53:58.929 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - 
03:53:58.929 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg3929596550722859220 -l logfile start
03:53:58.929 [log:pid(10272)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:initdb - 
03:53:58.930 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 4026c360-af91-4208-a1e8-6cf61e8e2a85 initdb completed in 00:00:01.157
03:53:58.940 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 4026c360-af91-4208-a1e8-6cf61e8e2a85 postmaster started as java.lang.UNIXProcess@615091b8 on port 5432.  Waiting up to PT10S for server startup to finish.
03:53:58.971 [log:pid(10289)] INFO pg-4026c360-af91-4208-a1e8-6cf61e8e2a85 - waiting for server to start....2020-09-27 03:53:58.971 UTC [10293] LOG:  listening on IPv6 address "::1", port 5432
03:53:58.972 [log:pid(10289)] INFO pg-4026c360-af91-4208-a1e8-6cf61e8e2a85 - 2020-09-27 03:53:58.971 UTC [10293] LOG:  listening on IPv4 address "127.0.0.1", port 5432
03:53:58.972 [log:pid(10289)] INFO pg-4026c360-af91-4208-a1e8-6cf61e8e2a85 - 2020-09-27 03:53:58.971 UTC [10293] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
03:53:59.127 [log:pid(10289)] INFO pg-4026c360-af91-4208-a1e8-6cf61e8e2a85 - 2020-09-27 03:53:59.070 UTC [10295] LOG:  incomplete startup packet
03:53:59.127 [log:pid(10289)] INFO pg-4026c360-af91-4208-a1e8-6cf61e8e2a85 - 2020-09-27 03:53:59.081 UTC [10294] LOG:  database system was shut down at 2020-09-27 03:53:58 UTC
03:53:59.127 [log:pid(10289)] INFO pg-4026c360-af91-4208-a1e8-6cf61e8e2a85 - 2020-09-27 03:53:59.085 UTC [10293] LOG:  database system is ready to accept connections
03:53:59.152 [log:pid(10289)] INFO pg-4026c360-af91-4208-a1e8-6cf61e8e2a85 -  done
03:53:59.152 [log:pid(10289)] INFO pg-4026c360-af91-4208-a1e8-6cf61e8e2a85 - server started
03:53:59.195 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 4026c360-af91-4208-a1e8-6cf61e8e2a85 postmaster startup finished in 00:00:00.256
03:53:59.215 [main] INFO org.flywaydb.core.internal.license.VersionPrinter - Flyway Community Edition 5.2.4 by Boxfuse
03:53:59.231 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
03:53:59.231 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
03:53:59.236 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:53:59.241 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:53:59.244 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:53:59.244 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:53:59.244 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:53:59.244 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:53:59.246 [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/
03:53:59.246 [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)
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:53:59.247 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:53:59.248 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:53:59.251 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:53:59.254 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:53:59.262 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
03:53:59.266 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
03:53:59.270 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Orders_Table.sql ...
03:53:59.273 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:53:59.275 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:53:59.275 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:53:59.275 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:53:59.276 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:53:59.276 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:53:59.276 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:53:59.276 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:53:59.276 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
03:53:59.277 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
03:53:59.277 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:53:59.277 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:53:59.277 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:53:59.277 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:53:59.278 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:53:59.278 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:53:59.278 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:53:59.278 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:53:59.279 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:53:59.279 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:53:59.279 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Orders_Add_Customer_FK.sql ...
03:53:59.280 [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
03:53:59.281 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Create_Usages_Table.sql ...
03:53:59.281 [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
03:53:59.282 [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
)
03:53:59.283 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:53:59.283 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:53:59.283 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:53:59.284 [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
03:53:59.284 [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.'
03:53:59.284 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:53:59.284 [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".'
03:53:59.285 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:53:59.285 [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.'
03:53:59.285 [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.'
03:53:59.285 [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.'
03:53:59.285 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:53:59.286 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.13__Create_Function_Update_Quota_Table_Usage.sql ...
03:53:59.288 [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
03:53:59.289 [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
03:53:59.289 [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()
03:53:59.291 [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
03:53:59.291 [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
03:53:59.292 [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()
03:53:59.292 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.14__Alter_Usages_Add_Unique_Constraint.sql ...
03:53:59.293 [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)
03:53:59.293 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql ...
03:53:59.294 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:53:59.294 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
03:53:59.295 [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
03:53:59.295 [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,
    membershipId integer,
    owner text
)
03:53:59.296 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:53:59.296 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 20: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:53:59.296 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:53:59.296 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:53:59.296 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
03:53:59.296 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:53:59.297 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:53:59.297 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:53:59.297 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:53:59.297 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:53:59.297 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:53:59.297 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:53:59.297 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:53:59.297 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:53:59.298 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
03:53:59.298 [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, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:53:59.298 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:53:59.299 [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, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:53:59.299 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Memberships_Table.sql ...
03:53:59.299 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:53:59.300 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:53:59.300 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:53:59.301 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:53:59.301 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:53:59.301 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:53:59.301 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:53:59.301 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:53:59.301 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:53:59.301 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:53:59.302 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:53:59.302 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:53:59.302 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:53:59.302 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:53:59.302 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:53:59.302 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:53:59.302 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:53:59.303 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:53:59.303 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:53:59.303 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Alter_Quotas_Add_Membership_FK.sql ...
03:53:59.304 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:53:59.304 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Create_Customers_Table.sql ...
03:53:59.304 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:53:59.305 [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
)
03:53:59.305 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:53:59.305 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:53:59.305 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:53:59.305 [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.'
03:53:59.305 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:53:59.306 [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".'
03:53:59.306 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:53:59.306 [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).'
03:53:59.306 [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.'
03:53:59.306 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:53:59.306 [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".'
03:53:59.306 [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'
03:53:59.306 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
03:53:59.306 [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.'
03:53:59.306 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:53:59.306 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:53:59.307 [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'
03:53:59.307 [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)'
03:53:59.307 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:53:59.307 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:53:59.307 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:53:59.307 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Alter_Memberships_Add_Customer_FK.sql ...
03:53:59.308 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:53:59.308 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Create_Products_Table.sql ...
03:53:59.308 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
03:53:59.309 [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
)
03:53:59.309 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:53:59.309 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
03:53:59.309 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
03:53:59.309 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:53:59.310 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
03:53:59.310 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:53:59.310 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:53:59.310 [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"'
03:53:59.310 [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.'
03:53:59.310 [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'
03:53:59.310 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
03:53:59.310 [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.'
03:53:59.310 [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.'
03:53:59.310 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
03:53:59.310 [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).'
03:53:59.311 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:53:59.311 [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.'
03:53:59.311 [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.'
03:53:59.311 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:53:59.311 [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.'
03:53:59.311 [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.'
03:53:59.311 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Insert_Standard_Products.sql ...
03:53:59.313 [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."}]}'
)
03:53:59.314 [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."}]}'
)
03:53:59.316 [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."}]}'
)
03:53:59.317 [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."}]}'
)
03:53:59.321 [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."}]}'
)
03:53:59.322 [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',
    '{}'
)
03:53:59.323 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Alter_Memberships_Add_Product_FK.sql ...
03:53:59.323 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:53:59.324 [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)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Orders_Table.sql (filename: V1.10__Create_Orders_Table.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql (filename: V1.11__Alter_Orders_Add_Customer_FK.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Create_Usages_Table.sql (filename: V1.12__Create_Usages_Table.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.13__Create_Function_Update_Quota_Table_Usage.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.14__Alter_Usages_Add_Unique_Constraint.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql (filename: V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql)
03:53:59.324 [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)
03:53:59.324 [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)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Memberships_Table.sql (filename: V1.3__Create_Memberships_Table.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql (filename: V1.4__Alter_Quotas_Add_Membership_FK.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Create_Customers_Table.sql (filename: V1.5__Create_Customers_Table.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql (filename: V1.6__Alter_Memberships_Add_Customer_FK.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Create_Products_Table.sql (filename: V1.7__Create_Products_Table.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Insert_Standard_Products.sql (filename: V1.8__Insert_Standard_Products.sql)
03:53:59.324 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql (filename: V1.9__Alter_Memberships_Add_Product_FK.sql)
03:53:59.331 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 16 migrations (execution time 00:00.068s)
03:53:59.333 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
03:53:59.354 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
03:53:59.355 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
03:53:59.356 [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
)
03:53:59.356 [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")
03:53:59.357 [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")
03:53:59.357 [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
)
03:53:59.368 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.368 [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")
03:53:59.370 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.370 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
03:53:59.370 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.370 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
03:53:59.375 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
03:53:59.376 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
03:53:59.377 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
03:53:59.380 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.383 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
03:53:59.384 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
03:53:59.385 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.385 [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,
    membershipId integer,
    owner text
)
03:53:59.387 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.387 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:53:59.388 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.388 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:53:59.388 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.388 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:53:59.389 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.389 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:53:59.389 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.389 [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.'
03:53:59.390 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.390 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:53:59.390 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.390 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:53:59.390 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.390 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:53:59.391 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.391 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:53:59.391 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.391 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:53:59.391 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.391 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:53:59.391 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.391 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:53:59.392 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.392 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:53:59.392 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.392 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:53:59.392 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.392 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
03:53:59.394 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.396 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
03:53:59.397 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:53:59.397 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:53:59.397 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:53:59.398 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:53:59.398 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:53:59.398 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:53:59.398 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
03:53:59.399 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.400 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Memberships Table
03:53:59.401 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:53:59.402 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.402 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:53:59.403 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.403 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:53:59.403 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.403 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:53:59.404 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.404 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:53:59.404 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.404 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:53:59.404 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.404 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.405 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.406 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:53:59.407 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.407 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Memberships Table
03:53:59.407 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.409 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:53:59.410 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:53:59.411 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.411 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:53:59.412 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.413 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Create Customers Table
03:53:59.414 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:53:59.415 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.415 [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
)
03:53:59.416 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.416 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:53:59.416 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.416 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:53:59.417 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.417 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:53:59.417 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.417 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
03:53:59.417 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.417 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:53:59.417 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.417 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
03:53:59.417 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.418 [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).'
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.418 [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.'
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
03:53:59.418 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.418 [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.'
03:53:59.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:53:59.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:53:59.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.419 [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'
03:53:59.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.419 [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)'
03:53:59.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:53:59.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.419 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:53:59.420 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.420 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:53:59.420 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.420 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Create Customers Table
03:53:59.421 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.422 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:53:59.423 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:53:59.424 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.424 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:53:59.425 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.426 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Create Products Table
03:53:59.427 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
03:53:59.427 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.427 [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
)
03:53:59.429 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.429 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:53:59.429 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.429 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
03:53:59.429 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.430 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
03:53:59.430 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.430 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:53:59.430 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.430 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
03:53:59.431 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.431 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:53:59.431 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.431 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:53:59.431 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.431 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
03:53:59.431 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.431 [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.'
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.432 [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'
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.432 [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.'
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.432 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
03:53:59.433 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.433 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
03:53:59.433 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.433 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:53:59.433 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.433 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
03:53:59.433 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.433 [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.'
03:53:59.433 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.433 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Create Products Table
03:53:59.434 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.436 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Insert Standard Products
03:53:59.436 [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."}]}'
)
03:53:59.437 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:53:59.437 [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."}]}'
)
03:53:59.438 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:53:59.438 [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."}]}'
)
03:53:59.438 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:53:59.438 [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."}]}'
)
03:53:59.438 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:53:59.438 [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."}]}'
)
03:53:59.439 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:53:59.439 [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',
    '{}'
)
03:53:59.440 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:53:59.440 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Insert Standard Products
03:53:59.441 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.442 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Alter Memberships Add Product FK
03:53:59.443 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:53:59.443 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.443 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Alter Memberships Add Product FK
03:53:59.444 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.446 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Orders Table
03:53:59.446 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:53:59.447 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.447 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:53:59.448 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.448 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:53:59.449 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.449 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:53:59.449 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.449 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.450 [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.'
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.450 [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.'
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:53:59.450 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.451 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Orders Table
03:53:59.452 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.454 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Orders Add Customer FK
03:53:59.454 [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
03:53:59.455 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.455 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Orders Add Customer FK
03:53:59.456 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.457 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Create Usages Table
03:53:59.458 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
03:53:59.459 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.459 [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
)
03:53:59.460 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.460 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:53:59.460 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.460 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:53:59.461 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.461 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:53:59.461 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.461 [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
03:53:59.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.462 [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.'
03:53:59.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:53:59.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
03:53:59.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:53:59.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.462 [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.'
03:53:59.462 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.462 [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.'
03:53:59.463 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.463 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
03:53:59.463 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.463 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:53:59.463 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.463 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Create Usages Table
03:53:59.464 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.465 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:53:59.466 [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
03:53:59.467 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.467 [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
03:53:59.469 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
03:53:59.469 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.469 [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()
03:53:59.469 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.469 [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
03:53:59.469 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.469 [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
03:53:59.470 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
03:53:59.470 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.470 [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()
03:53:59.470 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.470 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:53:59.471 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.472 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:53:59.472 [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)
03:53:59.473 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.473 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:53:59.474 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.475 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:53:59.475 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:53:59.476 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:53:59.476 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:53:59.477 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:53:59.478 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 16 migrations to schema "public" (execution time 00:00.125s)
03:53:59.479 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 45 of 235M
03:53:59.507 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Log4jLoggerProvider
03:53:59.507 [main] INFO org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 6.1.0.Final
03:53:59.511 [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.
03:53:59.521 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@64beebb7
03:53:59.522 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
03:53:59.522 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
03:53:59.524 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@2a39fe6a
03:53:59.525 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@68759011
03:53:59.527 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
03:53:59.528 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
03:53:59.528 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
03:53:59.528 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
03:53:59.546 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
03:53:59.621 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
03:53:59.627 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
03:53:59.627 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
03:53:59.627 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
03:53:59.627 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
03:53:59.627 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
03:53:59.654 [main] DEBUG org.eclipse.jetty.util.log - Logging to Logger[org.eclipse.jetty.util.log] via org.eclipse.jetty.util.log.Slf4jLog
03:53:59.656 [main] INFO org.eclipse.jetty.util.log - Logging initialized @3341ms to org.eclipse.jetty.util.log.Slf4jLog
03:53:59.709 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@71154f21
03:53:59.713 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@503fbbc6{/,null,UNAVAILABLE} added {ServletHandler@55f45b92{STOPPED},MANAGED}
03:53:59.715 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@2c30b71f
03:53:59.715 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@1d81e101{/,null,UNAVAILABLE} added {ServletHandler@ec50f54{STOPPED},MANAGED}
03:54:00.717 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:00.719 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:00.719 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:00.719 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:00.719 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:00.719 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:00.719 [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/
03:54:00.719 [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)
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:00.720 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:00.721 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:00.728 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
03:54:00.756 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.028s)
03:54:00.757 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 192 of 302M
03:54:00.759 [log:pid(10289)] INFO pg-4026c360-af91-4208-a1e8-6cf61e8e2a85 - 2020-09-27 03:54:00.759 UTC [10293] LOG:  received fast shutdown request
03:54:00.860 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 4026c360-af91-4208-a1e8-6cf61e8e2a85 shut down postmaster in 00:00:00.102
03:54:00.860 [log:pid(10312)] INFO init-4026c360-af91-4208-a1e8-6cf61e8e2a85:pg_ctl - waiting for server to shut down.... done
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.269 s - in org.dataone.bookkeeper.jdbi.MembershipStoreTest
[INFO] Running org.dataone.bookkeeper.jdbi.ProductStoreTest
03:54:00.957 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - The files belonging to this database system will be owned by user "jenkins".
03:54:00.957 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - This user must also own the server process.
03:54:00.957 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - 
03:54:00.957 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
03:54:00.957 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - The default text search configuration will be set to "english".
03:54:00.957 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - 
03:54:00.957 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - Data page checksums are disabled.
03:54:00.957 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - 
03:54:00.957 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - fixing permissions on existing directory /tmp/epg931864332657673263 ... ok
03:54:00.957 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - creating subdirectories ... ok
03:54:00.975 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - selecting default max_connections ... 100
03:54:00.993 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - selecting default shared_buffers ... 128MB
03:54:00.993 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - selecting dynamic shared memory implementation ... posix
03:54:01.070 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - creating configuration files ... ok
03:54:01.212 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - running bootstrap script ... ok
03:54:01.700 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - performing post-bootstrap initialization ... ok
03:54:01.914 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - syncing data to disk ... ok
03:54:01.914 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - 
03:54:01.914 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - Success. You can now start the database server using:
03:54:01.914 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - 
03:54:01.914 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg931864332657673263 -l logfile start
03:54:01.914 [log:pid(10314)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:initdb - 
03:54:01.915 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 264b6ac2-e07e-4b12-b77b-c76488cdf910 initdb completed in 00:00:00.966
03:54:01.917 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 264b6ac2-e07e-4b12-b77b-c76488cdf910 postmaster started as java.lang.UNIXProcess@34d45ec0 on port 5432.  Waiting up to PT10S for server startup to finish.
03:54:01.927 [log:pid(10330)] INFO pg-264b6ac2-e07e-4b12-b77b-c76488cdf910 - waiting for server to start....2020-09-27 03:54:01.927 UTC [10334] LOG:  listening on IPv6 address "::1", port 5432
03:54:01.928 [log:pid(10330)] INFO pg-264b6ac2-e07e-4b12-b77b-c76488cdf910 - 2020-09-27 03:54:01.927 UTC [10334] LOG:  listening on IPv4 address "127.0.0.1", port 5432
03:54:01.928 [log:pid(10330)] INFO pg-264b6ac2-e07e-4b12-b77b-c76488cdf910 - 2020-09-27 03:54:01.927 UTC [10334] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
03:54:01.984 [log:pid(10330)] INFO pg-264b6ac2-e07e-4b12-b77b-c76488cdf910 - 2020-09-27 03:54:01.983 UTC [10335] LOG:  database system was shut down at 2020-09-27 03:54:01 UTC
03:54:01.986 [log:pid(10330)] INFO pg-264b6ac2-e07e-4b12-b77b-c76488cdf910 - 2020-09-27 03:54:01.986 UTC [10334] LOG:  database system is ready to accept connections
03:54:02.018 [log:pid(10330)] INFO pg-264b6ac2-e07e-4b12-b77b-c76488cdf910 - 2020-09-27 03:54:02.018 UTC [10342] LOG:  incomplete startup packet
03:54:02.023 [log:pid(10330)] INFO pg-264b6ac2-e07e-4b12-b77b-c76488cdf910 -  done
03:54:02.023 [log:pid(10330)] INFO pg-264b6ac2-e07e-4b12-b77b-c76488cdf910 - server started
03:54:02.025 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 264b6ac2-e07e-4b12-b77b-c76488cdf910 postmaster startup finished in 00:00:00.110
03:54:02.032 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
03:54:02.032 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
03:54:02.033 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:02.033 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:02.033 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:02.033 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:02.034 [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/
03:54:02.034 [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)
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:02.034 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:02.035 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:02.035 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:02.038 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
03:54:02.039 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
03:54:02.039 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Orders_Table.sql ...
03:54:02.040 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:02.040 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:02.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:02.042 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:02.042 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:02.042 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Orders_Add_Customer_FK.sql ...
03:54:02.042 [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
03:54:02.043 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Create_Usages_Table.sql ...
03:54:02.043 [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
03:54:02.043 [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
)
03:54:02.043 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:02.044 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:02.044 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:02.044 [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
03:54:02.044 [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.'
03:54:02.044 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:02.044 [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".'
03:54:02.044 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:02.044 [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.'
03:54:02.044 [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.'
03:54:02.044 [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.'
03:54:02.044 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:02.045 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.13__Create_Function_Update_Quota_Table_Usage.sql ...
03:54:02.045 [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
03:54:02.045 [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
03:54:02.046 [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()
03:54:02.046 [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
03:54:02.046 [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
03:54:02.046 [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()
03:54:02.047 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.14__Alter_Usages_Add_Unique_Constraint.sql ...
03:54:02.047 [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)
03:54:02.047 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql ...
03:54:02.048 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:02.048 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
03:54:02.049 [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
03:54:02.049 [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,
    membershipId integer,
    owner text
)
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 20: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:02.049 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:02.050 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:02.050 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:02.050 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:02.050 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
03:54:02.050 [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, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:02.051 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:02.051 [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, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:02.051 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Memberships_Table.sql ...
03:54:02.051 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:02.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:02.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:02.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:02.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:02.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:02.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Alter_Quotas_Add_Membership_FK.sql ...
03:54:02.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:02.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Create_Customers_Table.sql ...
03:54:02.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:02.055 [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
)
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:02.056 [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.'
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:02.056 [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".'
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:02.056 [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).'
03:54:02.056 [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.'
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:02.056 [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".'
03:54:02.056 [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'
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:02.056 [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.'
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:02.056 [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'
03:54:02.056 [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)'
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:02.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:02.057 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:02.057 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Alter_Memberships_Add_Customer_FK.sql ...
03:54:02.057 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:02.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Create_Products_Table.sql ...
03:54:02.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:02.058 [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
)
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:02.059 [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"'
03:54:02.059 [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.'
03:54:02.059 [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'
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:02.059 [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.'
03:54:02.059 [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.'
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:02.059 [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).'
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:02.059 [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.'
03:54:02.059 [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.'
03:54:02.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:02.059 [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.'
03:54:02.060 [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.'
03:54:02.060 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Insert_Standard_Products.sql ...
03:54:02.061 [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."}]}'
)
03:54:02.062 [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."}]}'
)
03:54:02.063 [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."}]}'
)
03:54:02.064 [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."}]}'
)
03:54:02.066 [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."}]}'
)
03:54:02.067 [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',
    '{}'
)
03:54:02.067 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Alter_Memberships_Add_Product_FK.sql ...
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:02.068 [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)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Orders_Table.sql (filename: V1.10__Create_Orders_Table.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql (filename: V1.11__Alter_Orders_Add_Customer_FK.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Create_Usages_Table.sql (filename: V1.12__Create_Usages_Table.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.13__Create_Function_Update_Quota_Table_Usage.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.14__Alter_Usages_Add_Unique_Constraint.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql (filename: V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql)
03:54:02.068 [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)
03:54:02.068 [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)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Memberships_Table.sql (filename: V1.3__Create_Memberships_Table.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql (filename: V1.4__Alter_Quotas_Add_Membership_FK.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Create_Customers_Table.sql (filename: V1.5__Create_Customers_Table.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql (filename: V1.6__Alter_Memberships_Add_Customer_FK.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Create_Products_Table.sql (filename: V1.7__Create_Products_Table.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Insert_Standard_Products.sql (filename: V1.8__Insert_Standard_Products.sql)
03:54:02.068 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql (filename: V1.9__Alter_Memberships_Add_Product_FK.sql)
03:54:02.069 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 16 migrations (execution time 00:00.030s)
03:54:02.070 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
03:54:02.075 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
03:54:02.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
03:54:02.076 [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
)
03:54:02.076 [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")
03:54:02.076 [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")
03:54:02.076 [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
)
03:54:02.079 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.080 [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")
03:54:02.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.080 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
03:54:02.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.081 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
03:54:02.084 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
03:54:02.084 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
03:54:02.084 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
03:54:02.086 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.087 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
03:54:02.087 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
03:54:02.088 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.088 [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,
    membershipId integer,
    owner text
)
03:54:02.089 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.089 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:02.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:02.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:02.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:02.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.091 [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.'
03:54:02.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:02.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:02.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:02.091 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.092 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
03:54:02.093 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.094 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
03:54:02.095 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:02.095 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:02.095 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:02.096 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:02.096 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:02.096 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:02.096 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
03:54:02.097 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.097 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Memberships Table
03:54:02.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:02.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:02.100 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.100 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:02.100 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.100 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:02.100 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.100 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.101 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:02.103 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.103 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Memberships Table
03:54:02.103 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.104 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:02.105 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:02.106 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.106 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:02.107 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.108 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Create Customers Table
03:54:02.108 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:02.109 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.109 [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
)
03:54:02.110 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.110 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:02.110 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.110 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:02.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:02.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
03:54:02.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:02.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
03:54:02.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.112 [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).'
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.112 [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.'
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.112 [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.'
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:02.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.113 [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'
03:54:02.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.113 [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)'
03:54:02.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:02.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:02.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:02.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.113 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Create Customers Table
03:54:02.114 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.115 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:02.115 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:02.116 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.116 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:02.117 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.118 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Create Products Table
03:54:02.118 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:02.118 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.118 [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
)
03:54:02.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:02.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:02.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:02.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:02.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:02.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.122 [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.'
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.122 [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'
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.122 [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.'
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.123 [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.'
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.123 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Create Products Table
03:54:02.124 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.125 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Insert Standard Products
03:54:02.125 [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."}]}'
)
03:54:02.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:02.126 [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."}]}'
)
03:54:02.126 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:02.126 [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."}]}'
)
03:54:02.127 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:02.127 [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."}]}'
)
03:54:02.127 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:02.127 [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."}]}'
)
03:54:02.128 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:02.128 [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',
    '{}'
)
03:54:02.128 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:02.128 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Insert Standard Products
03:54:02.129 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.130 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:02.130 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:02.131 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.131 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:02.132 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.133 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Orders Table
03:54:02.133 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:02.133 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.134 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:02.135 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.135 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:02.135 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.135 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:02.136 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.136 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:02.136 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.136 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:02.136 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.136 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:02.136 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.136 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:02.136 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.136 [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.'
03:54:02.136 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.136 [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.'
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.137 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:02.138 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.138 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:02.138 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.138 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Orders Table
03:54:02.138 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.139 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:02.140 [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
03:54:02.141 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.141 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:02.141 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.142 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Create Usages Table
03:54:02.143 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
03:54:02.143 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.143 [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
)
03:54:02.144 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.145 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:02.145 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.145 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:02.145 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.145 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:02.145 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.146 [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
03:54:02.146 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.146 [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.'
03:54:02.146 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.146 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.147 [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.'
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.147 [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.'
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.147 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Create Usages Table
03:54:02.148 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.150 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:02.150 [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
03:54:02.152 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.152 [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
03:54:02.152 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
03:54:02.152 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.152 [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()
03:54:02.152 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.152 [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
03:54:02.153 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.153 [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
03:54:02.153 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
03:54:02.153 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.153 [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()
03:54:02.153 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.153 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:02.154 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.155 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:02.155 [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)
03:54:02.156 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.156 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:02.172 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.173 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:02.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:02.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:02.174 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:02.175 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:02.176 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 16 migrations to schema "public" (execution time 00:00.101s)
03:54:02.176 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 22 of 360M
03:54:02.179 [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.
03:54:02.180 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@64beebb7
03:54:02.180 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
03:54:02.180 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
03:54:02.180 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@2a39fe6a
03:54:02.180 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@68759011
03:54:02.180 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
03:54:02.180 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
03:54:02.180 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
03:54:02.181 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
03:54:02.181 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
03:54:02.184 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
03:54:02.184 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
03:54:02.184 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
03:54:02.184 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
03:54:02.184 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
03:54:02.184 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
03:54:02.185 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@6993c8df
03:54:02.185 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@57545c3f{/,null,UNAVAILABLE} added {ServletHandler@326e0b8e{STOPPED},MANAGED}
03:54:02.185 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@36baa049
03:54:02.185 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@41184371{/,null,UNAVAILABLE} added {ServletHandler@34585ac9{STOPPED},MANAGED}
03:54:02.342 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:02.342 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:02.342 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:02.342 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:02.342 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:02.342 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:02.342 [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/
03:54:02.342 [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)
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:02.343 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:02.347 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
03:54:02.368 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.021s)
03:54:02.369 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 91 of 360M
03:54:02.370 [log:pid(10330)] INFO pg-264b6ac2-e07e-4b12-b77b-c76488cdf910 - 2020-09-27 03:54:02.370 UTC [10334] LOG:  received fast shutdown request
03:54:02.472 [log:pid(10348)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:pg_ctl - waiting for server to shut down.... done
03:54:02.472 [log:pid(10348)] INFO init-264b6ac2-e07e-4b12-b77b-c76488cdf910:pg_ctl - server stopped
03:54:02.473 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 264b6ac2-e07e-4b12-b77b-c76488cdf910 shut down postmaster in 00:00:00.103
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.892 s - in org.dataone.bookkeeper.jdbi.ProductStoreTest
[INFO] Running org.dataone.bookkeeper.jdbi.QuotaStoreTest
03:54:02.851 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - The files belonging to this database system will be owned by user "jenkins".
03:54:02.851 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - This user must also own the server process.
03:54:02.851 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - 
03:54:02.851 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
03:54:02.851 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - The default text search configuration will be set to "english".
03:54:02.851 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - 
03:54:02.851 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - Data page checksums are disabled.
03:54:02.851 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - 
03:54:02.851 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - fixing permissions on existing directory /tmp/epg7299604239281763061 ... ok
03:54:02.851 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - creating subdirectories ... ok
03:54:02.862 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - selecting default max_connections ... 100
03:54:02.875 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - selecting default shared_buffers ... 128MB
03:54:02.875 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - selecting dynamic shared memory implementation ... posix
03:54:02.942 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - creating configuration files ... ok
03:54:03.035 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - running bootstrap script ... ok
03:54:03.485 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - performing post-bootstrap initialization ... ok
03:54:03.703 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - syncing data to disk ... ok
03:54:03.703 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - 
03:54:03.703 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - Success. You can now start the database server using:
03:54:03.703 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - 
03:54:03.703 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg7299604239281763061 -l logfile start
03:54:03.703 [log:pid(10352)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:initdb - 
03:54:03.704 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - d97497ab-5b09-42ee-b984-b1cb9ac79bf5 initdb completed in 00:00:00.861
03:54:03.706 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - d97497ab-5b09-42ee-b984-b1cb9ac79bf5 postmaster started as java.lang.UNIXProcess@75cf0de5 on port 5432.  Waiting up to PT10S for server startup to finish.
03:54:03.717 [log:pid(10368)] INFO pg-d97497ab-5b09-42ee-b984-b1cb9ac79bf5 - waiting for server to start....2020-09-27 03:54:03.716 UTC [10372] LOG:  listening on IPv6 address "::1", port 5432
03:54:03.717 [log:pid(10368)] INFO pg-d97497ab-5b09-42ee-b984-b1cb9ac79bf5 - 2020-09-27 03:54:03.717 UTC [10372] LOG:  listening on IPv4 address "127.0.0.1", port 5432
03:54:03.717 [log:pid(10368)] INFO pg-d97497ab-5b09-42ee-b984-b1cb9ac79bf5 - 2020-09-27 03:54:03.717 UTC [10372] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
03:54:03.753 [log:pid(10368)] INFO pg-d97497ab-5b09-42ee-b984-b1cb9ac79bf5 - 2020-09-27 03:54:03.753 UTC [10373] LOG:  database system was shut down at 2020-09-27 03:54:03 UTC
03:54:03.755 [log:pid(10368)] INFO pg-d97497ab-5b09-42ee-b984-b1cb9ac79bf5 - 2020-09-27 03:54:03.755 UTC [10372] LOG:  database system is ready to accept connections
03:54:03.807 [log:pid(10368)] INFO pg-d97497ab-5b09-42ee-b984-b1cb9ac79bf5 - 2020-09-27 03:54:03.807 UTC [10380] LOG:  incomplete startup packet
03:54:03.812 [log:pid(10368)] INFO pg-d97497ab-5b09-42ee-b984-b1cb9ac79bf5 -  done
03:54:03.812 [log:pid(10368)] INFO pg-d97497ab-5b09-42ee-b984-b1cb9ac79bf5 - server started
03:54:03.813 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - d97497ab-5b09-42ee-b984-b1cb9ac79bf5 postmaster startup finished in 00:00:00.108
03:54:03.820 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
03:54:03.820 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
03:54:03.821 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:03.821 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:03.821 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:03.821 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:03.822 [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/
03:54:03.822 [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)
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:03.822 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:03.823 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:03.825 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
03:54:03.825 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Orders_Table.sql ...
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:03.826 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:03.826 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:03.827 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:03.827 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:03.827 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:03.827 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:03.827 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Orders_Add_Customer_FK.sql ...
03:54:03.827 [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
03:54:03.827 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Create_Usages_Table.sql ...
03:54:03.827 [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
03:54:03.827 [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
)
03:54:03.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:03.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:03.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:03.828 [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
03:54:03.828 [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.'
03:54:03.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:03.828 [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".'
03:54:03.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:03.828 [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.'
03:54:03.828 [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.'
03:54:03.828 [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.'
03:54:03.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:03.828 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.13__Create_Function_Update_Quota_Table_Usage.sql ...
03:54:03.828 [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
03:54:03.828 [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
03:54:03.829 [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()
03:54:03.829 [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
03:54:03.829 [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
03:54:03.829 [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()
03:54:03.829 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.14__Alter_Usages_Add_Unique_Constraint.sql ...
03:54:03.829 [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)
03:54:03.829 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql ...
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
03:54:03.830 [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
03:54:03.830 [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,
    membershipId integer,
    owner text
)
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 20: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:03.830 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:03.831 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
03:54:03.831 [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, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:03.831 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:03.831 [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, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:03.831 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Memberships_Table.sql ...
03:54:03.831 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:03.831 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:03.831 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:03.831 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:03.831 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:03.831 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Alter_Quotas_Add_Membership_FK.sql ...
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:03.832 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Create_Customers_Table.sql ...
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:03.833 [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
)
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:03.833 [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.'
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:03.833 [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".'
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:03.833 [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).'
03:54:03.833 [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.'
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:03.833 [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".'
03:54:03.833 [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'
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:03.833 [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.'
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:03.833 [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'
03:54:03.833 [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)'
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:03.833 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Alter_Memberships_Add_Customer_FK.sql ...
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Create_Products_Table.sql ...
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:03.834 [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
)
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:03.834 [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"'
03:54:03.834 [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.'
03:54:03.834 [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'
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:03.834 [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.'
03:54:03.834 [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.'
03:54:03.834 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:03.834 [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).'
03:54:03.835 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:03.835 [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.'
03:54:03.835 [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.'
03:54:03.835 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:03.835 [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.'
03:54:03.835 [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.'
03:54:03.835 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Insert_Standard_Products.sql ...
03:54:03.835 [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."}]}'
)
03:54:03.836 [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."}]}'
)
03:54:03.836 [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."}]}'
)
03:54:03.837 [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."}]}'
)
03:54:03.837 [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."}]}'
)
03:54:03.838 [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',
    '{}'
)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Alter_Memberships_Add_Product_FK.sql ...
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:03.838 [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)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Orders_Table.sql (filename: V1.10__Create_Orders_Table.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql (filename: V1.11__Alter_Orders_Add_Customer_FK.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Create_Usages_Table.sql (filename: V1.12__Create_Usages_Table.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.13__Create_Function_Update_Quota_Table_Usage.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.14__Alter_Usages_Add_Unique_Constraint.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql (filename: V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql)
03:54:03.838 [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)
03:54:03.838 [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)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Memberships_Table.sql (filename: V1.3__Create_Memberships_Table.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql (filename: V1.4__Alter_Quotas_Add_Membership_FK.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Create_Customers_Table.sql (filename: V1.5__Create_Customers_Table.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql (filename: V1.6__Alter_Memberships_Add_Customer_FK.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Create_Products_Table.sql (filename: V1.7__Create_Products_Table.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Insert_Standard_Products.sql (filename: V1.8__Insert_Standard_Products.sql)
03:54:03.838 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql (filename: V1.9__Alter_Memberships_Add_Product_FK.sql)
03:54:03.839 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 16 migrations (execution time 00:00.013s)
03:54:03.840 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
03:54:03.843 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
03:54:03.843 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
03:54:03.844 [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
)
03:54:03.844 [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")
03:54:03.844 [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")
03:54:03.844 [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
)
03:54:03.847 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.847 [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")
03:54:03.847 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.847 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
03:54:03.848 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.848 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
03:54:03.849 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
03:54:03.850 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
03:54:03.850 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
03:54:03.851 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.854 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
03:54:03.854 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
03:54:03.855 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.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,
    membershipId integer,
    owner text
)
03:54:03.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:03.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:03.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:03.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:03.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.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.'
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.858 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
03:54:03.859 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.860 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
03:54:03.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:03.861 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:03.861 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:03.861 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:03.861 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:03.861 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:03.861 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
03:54:03.862 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.863 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Memberships Table
03:54:03.863 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:03.864 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.864 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:03.865 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.865 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:03.865 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.865 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.866 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.867 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Memberships Table
03:54:03.868 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.868 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:03.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:03.870 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.870 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:03.871 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.871 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Create Customers Table
03:54:03.872 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:03.872 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.872 [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
)
03:54:03.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.874 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [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).'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [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.'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [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.'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [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'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [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)'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.875 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:03.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:03.876 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.876 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Create Customers Table
03:54:03.876 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.877 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:03.877 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:03.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.878 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:03.879 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.880 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Create Products Table
03:54:03.880 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:03.880 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.880 [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
)
03:54:03.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:03.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:03.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:03.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.883 [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.'
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.883 [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'
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.883 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [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.'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [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.'
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.884 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Create Products Table
03:54:03.885 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.886 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Insert Standard Products
03:54:03.886 [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."}]}'
)
03:54:03.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:03.887 [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."}]}'
)
03:54:03.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:03.887 [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."}]}'
)
03:54:03.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:03.887 [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."}]}'
)
03:54:03.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:03.888 [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."}]}'
)
03:54:03.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:03.888 [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',
    '{}'
)
03:54:03.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:03.888 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Insert Standard Products
03:54:03.889 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.890 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:03.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:03.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.891 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:03.891 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.892 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Orders Table
03:54:03.892 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:03.893 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.893 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:03.894 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.894 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:03.894 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.894 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.895 [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.'
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.895 [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.'
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.896 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Orders Table
03:54:03.897 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.898 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:03.898 [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
03:54:03.899 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.899 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:03.899 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.900 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Create Usages Table
03:54:03.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
03:54:03.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.901 [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
)
03:54:03.902 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.902 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:03.902 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.902 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:03.903 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.903 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:03.903 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.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
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.904 [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.'
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.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.'
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.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.'
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.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.'
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.904 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Create Usages Table
03:54:03.905 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.906 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:03.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
03:54:03.907 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.907 [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
03:54:03.907 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
03:54:03.907 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.907 [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()
03:54:03.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.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
03:54:03.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.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
03:54:03.908 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
03:54:03.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.908 [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()
03:54:03.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.908 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:03.909 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.910 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:03.910 [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)
03:54:03.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.910 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:03.911 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.912 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:03.916 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:03.916 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:03.916 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:03.917 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:03.918 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 16 migrations to schema "public" (execution time 00:00.074s)
03:54:03.918 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 120 of 360M
03:54:03.921 [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.
03:54:03.922 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@64beebb7
03:54:03.922 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
03:54:03.922 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
03:54:03.922 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@2a39fe6a
03:54:03.922 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@68759011
03:54:03.922 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
03:54:03.922 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
03:54:03.922 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
03:54:03.922 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
03:54:03.923 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
03:54:03.926 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
03:54:03.926 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
03:54:03.926 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
03:54:03.926 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
03:54:03.926 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
03:54:03.926 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
03:54:03.927 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@1f43cab7
03:54:03.927 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@481558ce{/,null,UNAVAILABLE} added {ServletHandler@2668c286{STOPPED},MANAGED}
03:54:03.927 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@7f353a0f
03:54:03.927 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@7ea2412c{/,null,UNAVAILABLE} added {ServletHandler@1c93b51e{STOPPED},MANAGED}
03:54:04.186 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:04.187 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:04.187 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:04.187 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:04.187 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:04.187 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:04.187 [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/
03:54:04.187 [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)
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:04.188 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:04.192 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
03:54:04.216 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.023s)
03:54:04.216 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 222 of 360M
03:54:04.218 [log:pid(10368)] INFO pg-d97497ab-5b09-42ee-b984-b1cb9ac79bf5 - 2020-09-27 03:54:04.218 UTC [10372] LOG:  received fast shutdown request
03:54:04.318 [log:pid(10386)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:pg_ctl - waiting for server to shut down.... done
03:54:04.318 [log:pid(10386)] INFO init-d97497ab-5b09-42ee-b984-b1cb9ac79bf5:pg_ctl - server stopped
03:54:04.326 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - d97497ab-5b09-42ee-b984-b1cb9ac79bf5 shut down postmaster in 00:00:00.110
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.182 s - in org.dataone.bookkeeper.jdbi.QuotaStoreTest
[INFO] Running org.dataone.bookkeeper.jdbi.OrderStoreTest
03:54:05.037 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - The files belonging to this database system will be owned by user "jenkins".
03:54:05.037 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - This user must also own the server process.
03:54:05.037 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - 
03:54:05.037 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
03:54:05.037 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - The default text search configuration will be set to "english".
03:54:05.037 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - 
03:54:05.037 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - Data page checksums are disabled.
03:54:05.037 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - 
03:54:05.037 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - fixing permissions on existing directory /tmp/epg7829779915513887773 ... ok
03:54:05.037 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - creating subdirectories ... ok
03:54:05.062 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - selecting default max_connections ... 100
03:54:05.077 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - selecting default shared_buffers ... 128MB
03:54:05.077 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - selecting dynamic shared memory implementation ... posix
03:54:05.147 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - creating configuration files ... ok
03:54:05.245 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - running bootstrap script ... ok
03:54:05.627 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - performing post-bootstrap initialization ... ok
03:54:05.818 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - syncing data to disk ... ok
03:54:05.818 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - 
03:54:05.818 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - Success. You can now start the database server using:
03:54:05.818 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - 
03:54:05.818 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg7829779915513887773 -l logfile start
03:54:05.818 [log:pid(10390)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:initdb - 
03:54:05.819 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 6361a9fb-77d4-406d-a9e8-d6fd93aadb61 initdb completed in 00:00:00.789
03:54:05.820 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 6361a9fb-77d4-406d-a9e8-d6fd93aadb61 postmaster started as java.lang.UNIXProcess@6c742b84 on port 5432.  Waiting up to PT10S for server startup to finish.
03:54:05.831 [log:pid(10406)] INFO pg-6361a9fb-77d4-406d-a9e8-d6fd93aadb61 - waiting for server to start....2020-09-27 03:54:05.831 UTC [10410] LOG:  listening on IPv6 address "::1", port 5432
03:54:05.831 [log:pid(10406)] INFO pg-6361a9fb-77d4-406d-a9e8-d6fd93aadb61 - 2020-09-27 03:54:05.831 UTC [10410] LOG:  listening on IPv4 address "127.0.0.1", port 5432
03:54:05.831 [log:pid(10406)] INFO pg-6361a9fb-77d4-406d-a9e8-d6fd93aadb61 - 2020-09-27 03:54:05.831 UTC [10410] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
03:54:05.867 [log:pid(10406)] INFO pg-6361a9fb-77d4-406d-a9e8-d6fd93aadb61 - 2020-09-27 03:54:05.867 UTC [10411] LOG:  database system was shut down at 2020-09-27 03:54:05 UTC
03:54:05.870 [log:pid(10406)] INFO pg-6361a9fb-77d4-406d-a9e8-d6fd93aadb61 - 2020-09-27 03:54:05.870 UTC [10410] LOG:  database system is ready to accept connections
03:54:05.923 [log:pid(10406)] INFO pg-6361a9fb-77d4-406d-a9e8-d6fd93aadb61 - 2020-09-27 03:54:05.922 UTC [10418] LOG:  incomplete startup packet
03:54:05.926 [log:pid(10406)] INFO pg-6361a9fb-77d4-406d-a9e8-d6fd93aadb61 -  done
03:54:05.926 [log:pid(10406)] INFO pg-6361a9fb-77d4-406d-a9e8-d6fd93aadb61 - server started
03:54:05.929 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 6361a9fb-77d4-406d-a9e8-d6fd93aadb61 postmaster startup finished in 00:00:00.110
03:54:05.935 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
03:54:05.935 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
03:54:05.936 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:05.936 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:05.936 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:05.936 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:05.937 [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/
03:54:05.937 [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)
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:05.937 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:05.938 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:05.938 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:05.941 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
03:54:05.941 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
03:54:05.941 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Orders_Table.sql ...
03:54:05.941 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:05.942 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:05.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:05.943 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Orders_Add_Customer_FK.sql ...
03:54:05.943 [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
03:54:05.943 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Create_Usages_Table.sql ...
03:54:05.943 [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
03:54:05.943 [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
)
03:54:05.943 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:05.943 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:05.943 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:05.943 [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
03:54:05.944 [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.'
03:54:05.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:05.944 [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".'
03:54:05.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:05.944 [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.'
03:54:05.944 [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.'
03:54:05.944 [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.'
03:54:05.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:05.944 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.13__Create_Function_Update_Quota_Table_Usage.sql ...
03:54:05.944 [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
03:54:05.945 [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
03:54:05.945 [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()
03:54:05.945 [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
03:54:05.945 [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
03:54:05.945 [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()
03:54:05.945 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.14__Alter_Usages_Add_Unique_Constraint.sql ...
03:54:05.946 [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)
03:54:05.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql ...
03:54:05.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:05.946 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
03:54:05.946 [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
03:54:05.947 [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,
    membershipId integer,
    owner text
)
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 20: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:05.947 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:05.948 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
03:54:05.948 [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, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:05.948 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:05.948 [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, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:05.949 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Memberships_Table.sql ...
03:54:05.949 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:05.950 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:05.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:05.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:05.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:05.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:05.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:05.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:05.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:05.951 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Alter_Quotas_Add_Membership_FK.sql ...
03:54:05.952 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:05.952 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Create_Customers_Table.sql ...
03:54:05.952 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:05.953 [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
)
03:54:05.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:05.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:05.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:05.953 [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.'
03:54:05.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:05.953 [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".'
03:54:05.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:05.953 [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).'
03:54:05.953 [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.'
03:54:05.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:05.953 [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".'
03:54:05.953 [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'
03:54:05.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:05.953 [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.'
03:54:05.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:05.953 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:05.954 [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'
03:54:05.954 [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)'
03:54:05.954 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:05.954 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:05.954 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:05.954 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Alter_Memberships_Add_Customer_FK.sql ...
03:54:05.954 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:05.955 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Create_Products_Table.sql ...
03:54:05.955 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:05.956 [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
)
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:05.956 [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"'
03:54:05.956 [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.'
03:54:05.956 [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'
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:05.956 [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.'
03:54:05.956 [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.'
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:05.956 [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).'
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:05.956 [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.'
03:54:05.956 [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.'
03:54:05.956 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:05.956 [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.'
03:54:05.956 [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.'
03:54:05.957 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Insert_Standard_Products.sql ...
03:54:05.958 [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."}]}'
)
03:54:05.959 [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."}]}'
)
03:54:05.960 [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."}]}'
)
03:54:05.961 [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."}]}'
)
03:54:05.963 [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."}]}'
)
03:54:05.963 [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',
    '{}'
)
03:54:05.964 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Alter_Memberships_Add_Product_FK.sql ...
03:54:05.964 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:05.965 [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)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Orders_Table.sql (filename: V1.10__Create_Orders_Table.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql (filename: V1.11__Alter_Orders_Add_Customer_FK.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Create_Usages_Table.sql (filename: V1.12__Create_Usages_Table.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.13__Create_Function_Update_Quota_Table_Usage.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.14__Alter_Usages_Add_Unique_Constraint.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql (filename: V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql)
03:54:05.965 [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)
03:54:05.965 [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)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Memberships_Table.sql (filename: V1.3__Create_Memberships_Table.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql (filename: V1.4__Alter_Quotas_Add_Membership_FK.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Create_Customers_Table.sql (filename: V1.5__Create_Customers_Table.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql (filename: V1.6__Alter_Memberships_Add_Customer_FK.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Create_Products_Table.sql (filename: V1.7__Create_Products_Table.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Insert_Standard_Products.sql (filename: V1.8__Insert_Standard_Products.sql)
03:54:05.965 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql (filename: V1.9__Alter_Memberships_Add_Product_FK.sql)
03:54:05.966 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 16 migrations (execution time 00:00.024s)
03:54:05.966 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
03:54:05.971 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
03:54:05.971 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
03:54:05.972 [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
)
03:54:05.973 [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")
03:54:05.973 [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")
03:54:05.973 [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
)
03:54:05.976 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.976 [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")
03:54:05.977 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.977 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
03:54:05.977 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.977 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
03:54:05.979 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
03:54:05.979 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
03:54:05.980 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
03:54:05.981 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:05.982 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
03:54:05.982 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
03:54:05.983 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.983 [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,
    membershipId integer,
    owner text
)
03:54:05.985 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.985 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:05.985 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.985 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:05.985 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.985 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:05.986 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.986 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:05.986 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.986 [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.'
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.987 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:05.988 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.988 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:05.988 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.988 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:05.988 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.988 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:05.988 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.988 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
03:54:05.989 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:05.990 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
03:54:05.991 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:05.991 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:05.991 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:05.992 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:05.992 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:05.992 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:05.992 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
03:54:05.992 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:05.993 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Memberships Table
03:54:05.994 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:05.994 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.994 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:05.996 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.996 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:05.996 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.996 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:05.996 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.996 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:05.997 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.997 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:05.997 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.997 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:05.997 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.997 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:05.997 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.997 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:05.997 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.997 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.998 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:05.999 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.999 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:05.999 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.999 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:05.999 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.999 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:05.999 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:05.999 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Memberships Table
03:54:06.000 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.001 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:06.001 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:06.002 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.002 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:06.003 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.004 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Create Customers Table
03:54:06.004 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:06.005 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.005 [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
)
03:54:06.006 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.006 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:06.006 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.006 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:06.007 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.007 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:06.007 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.007 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
03:54:06.007 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.007 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.008 [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).'
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.008 [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.'
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.008 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
03:54:06.009 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.009 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:06.009 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.009 [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.'
03:54:06.009 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.009 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:06.009 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.009 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:06.009 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.009 [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'
03:54:06.009 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.009 [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)'
03:54:06.010 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.010 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:06.010 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.010 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:06.010 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.010 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:06.010 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.010 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Create Customers Table
03:54:06.011 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.011 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:06.012 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:06.013 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.013 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:06.013 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.014 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Create Products Table
03:54:06.015 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:06.015 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.015 [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
)
03:54:06.017 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.017 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:06.017 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.017 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:06.017 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.017 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:06.018 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.018 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:06.018 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.018 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:06.019 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.019 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:06.019 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.019 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:06.019 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.019 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
03:54:06.019 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.019 [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.'
03:54:06.019 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.019 [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'
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.020 [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.'
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.020 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
03:54:06.021 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.021 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
03:54:06.021 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.021 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:06.021 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.021 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
03:54:06.021 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.021 [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.'
03:54:06.021 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.021 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Create Products Table
03:54:06.022 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.023 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Insert Standard Products
03:54:06.023 [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."}]}'
)
03:54:06.024 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:06.024 [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."}]}'
)
03:54:06.025 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:06.025 [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."}]}'
)
03:54:06.025 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:06.025 [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."}]}'
)
03:54:06.026 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:06.026 [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."}]}'
)
03:54:06.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:06.027 [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',
    '{}'
)
03:54:06.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:06.027 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Insert Standard Products
03:54:06.028 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.029 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:06.029 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:06.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.030 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:06.031 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.032 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Orders Table
03:54:06.032 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:06.033 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.033 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:06.034 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.034 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:06.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:06.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:06.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:06.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:06.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:06.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.036 [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.'
03:54:06.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.036 [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.'
03:54:06.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.036 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.037 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:06.038 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.038 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:06.038 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.038 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:06.038 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.038 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:06.038 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.038 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Orders Table
03:54:06.039 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.040 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:06.040 [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
03:54:06.041 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.041 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:06.042 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.043 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Create Usages Table
03:54:06.044 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
03:54:06.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.054 [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
)
03:54:06.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:06.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:06.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:06.056 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.056 [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
03:54:06.057 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.057 [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.'
03:54:06.057 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.057 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:06.057 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.057 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
03:54:06.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:06.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.058 [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.'
03:54:06.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.058 [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.'
03:54:06.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
03:54:06.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:06.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.058 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Create Usages Table
03:54:06.059 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.060 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:06.061 [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
03:54:06.062 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.062 [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
03:54:06.063 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
03:54:06.063 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.063 [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()
03:54:06.063 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.063 [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
03:54:06.063 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.063 [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
03:54:06.064 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
03:54:06.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.064 [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()
03:54:06.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.064 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:06.065 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.066 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:06.066 [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)
03:54:06.067 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.067 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:06.067 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.068 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:06.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:06.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:06.069 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:06.070 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:06.071 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 16 migrations to schema "public" (execution time 00:00.100s)
03:54:06.071 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 246 of 360M
03:54:06.076 [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.
03:54:06.076 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@64beebb7
03:54:06.076 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
03:54:06.076 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
03:54:06.076 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@2a39fe6a
03:54:06.077 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@68759011
03:54:06.077 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
03:54:06.077 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
03:54:06.077 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
03:54:06.077 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
03:54:06.078 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
03:54:06.081 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
03:54:06.082 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
03:54:06.082 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
03:54:06.082 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
03:54:06.082 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
03:54:06.082 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
03:54:06.083 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@16bd7ae1
03:54:06.083 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@15d114ce{/,null,UNAVAILABLE} added {ServletHandler@3312f4f4{STOPPED},MANAGED}
03:54:06.083 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@b5aa65b
03:54:06.083 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@76cdafa3{/,null,UNAVAILABLE} added {ServletHandler@6b27b2d0{STOPPED},MANAGED}
03:54:06.294 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:06.294 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:06.294 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:06.295 [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/
03:54:06.295 [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)
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:06.295 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:06.296 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:06.296 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:06.300 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
03:54:06.321 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.021s)
03:54:06.322 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 101 of 399M
03:54:06.324 [log:pid(10406)] INFO pg-6361a9fb-77d4-406d-a9e8-d6fd93aadb61 - 2020-09-27 03:54:06.324 UTC [10410] LOG:  received fast shutdown request
03:54:06.424 [log:pid(10424)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:pg_ctl - waiting for server to shut down.... done
03:54:06.424 [log:pid(10424)] INFO init-6361a9fb-77d4-406d-a9e8-d6fd93aadb61:pg_ctl - server stopped
03:54:06.424 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 6361a9fb-77d4-406d-a9e8-d6fd93aadb61 shut down postmaster in 00:00:00.102
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.096 s - in org.dataone.bookkeeper.jdbi.OrderStoreTest
[INFO] Running org.dataone.bookkeeper.jdbi.UsageStoreTest
03:54:07.139 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - The files belonging to this database system will be owned by user "jenkins".
03:54:07.139 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - This user must also own the server process.
03:54:07.139 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - 
03:54:07.139 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
03:54:07.139 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - The default text search configuration will be set to "english".
03:54:07.139 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - 
03:54:07.139 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - Data page checksums are disabled.
03:54:07.139 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - 
03:54:07.139 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - fixing permissions on existing directory /tmp/epg8978586614875520508 ... ok
03:54:07.139 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - creating subdirectories ... ok
03:54:07.148 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - selecting default max_connections ... 100
03:54:07.162 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - selecting default shared_buffers ... 128MB
03:54:07.162 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - selecting dynamic shared memory implementation ... posix
03:54:07.232 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - creating configuration files ... ok
03:54:07.326 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - running bootstrap script ... ok
03:54:07.712 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - performing post-bootstrap initialization ... ok
03:54:07.899 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - syncing data to disk ... ok
03:54:07.899 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - 
03:54:07.899 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - Success. You can now start the database server using:
03:54:07.899 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - 
03:54:07.899 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg8978586614875520508 -l logfile start
03:54:07.899 [log:pid(10428)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:initdb - 
03:54:07.900 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - f2a35df1-8342-47fb-883c-d1a1fe5f7584 initdb completed in 00:00:00.769
03:54:07.902 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - f2a35df1-8342-47fb-883c-d1a1fe5f7584 postmaster started as java.lang.UNIXProcess@59d6642a on port 5432.  Waiting up to PT10S for server startup to finish.
03:54:07.912 [log:pid(10444)] INFO pg-f2a35df1-8342-47fb-883c-d1a1fe5f7584 - waiting for server to start....2020-09-27 03:54:07.912 UTC [10448] LOG:  listening on IPv6 address "::1", port 5432
03:54:07.912 [log:pid(10444)] INFO pg-f2a35df1-8342-47fb-883c-d1a1fe5f7584 - 2020-09-27 03:54:07.912 UTC [10448] LOG:  listening on IPv4 address "127.0.0.1", port 5432
03:54:07.913 [log:pid(10444)] INFO pg-f2a35df1-8342-47fb-883c-d1a1fe5f7584 - 2020-09-27 03:54:07.912 UTC [10448] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
03:54:07.948 [log:pid(10444)] INFO pg-f2a35df1-8342-47fb-883c-d1a1fe5f7584 - 2020-09-27 03:54:07.948 UTC [10449] LOG:  database system was shut down at 2020-09-27 03:54:07 UTC
03:54:07.951 [log:pid(10444)] INFO pg-f2a35df1-8342-47fb-883c-d1a1fe5f7584 - 2020-09-27 03:54:07.951 UTC [10448] LOG:  database system is ready to accept connections
03:54:08.004 [log:pid(10444)] INFO pg-f2a35df1-8342-47fb-883c-d1a1fe5f7584 - 2020-09-27 03:54:08.004 UTC [10456] LOG:  incomplete startup packet
03:54:08.008 [log:pid(10444)] INFO pg-f2a35df1-8342-47fb-883c-d1a1fe5f7584 -  done
03:54:08.008 [log:pid(10444)] INFO pg-f2a35df1-8342-47fb-883c-d1a1fe5f7584 - server started
03:54:08.010 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - f2a35df1-8342-47fb-883c-d1a1fe5f7584 postmaster startup finished in 00:00:00.109
03:54:08.016 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
03:54:08.016 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
03:54:08.017 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:08.018 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:08.018 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:08.018 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:08.018 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:08.018 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:08.018 [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/
03:54:08.018 [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)
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:08.019 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:08.022 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
03:54:08.022 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
03:54:08.022 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Orders_Table.sql ...
03:54:08.022 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:08.023 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:08.023 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Orders_Add_Customer_FK.sql ...
03:54:08.023 [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
03:54:08.024 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Create_Usages_Table.sql ...
03:54:08.024 [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
03:54:08.024 [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
)
03:54:08.024 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:08.024 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:08.024 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:08.024 [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
03:54:08.024 [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.'
03:54:08.024 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:08.024 [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".'
03:54:08.024 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:08.024 [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.'
03:54:08.024 [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.'
03:54:08.024 [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.'
03:54:08.024 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:08.024 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.13__Create_Function_Update_Quota_Table_Usage.sql ...
03:54:08.025 [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
03:54:08.025 [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
03:54:08.025 [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()
03:54:08.025 [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
03:54:08.025 [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
03:54:08.025 [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()
03:54:08.026 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.14__Alter_Usages_Add_Unique_Constraint.sql ...
03:54:08.026 [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)
03:54:08.026 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql ...
03:54:08.026 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:08.026 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
03:54:08.026 [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
03:54:08.027 [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,
    membershipId integer,
    owner text
)
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 20: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
03:54:08.027 [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, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:08.027 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:08.027 [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, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:08.027 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Memberships_Table.sql ...
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:08.028 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:08.029 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:08.029 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Alter_Quotas_Add_Membership_FK.sql ...
03:54:08.029 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:08.029 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Create_Customers_Table.sql ...
03:54:08.029 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:08.029 [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
)
03:54:08.029 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:08.029 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:08.030 [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.'
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:08.030 [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".'
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:08.030 [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).'
03:54:08.030 [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.'
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:08.030 [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".'
03:54:08.030 [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'
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:08.030 [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.'
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:08.030 [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'
03:54:08.030 [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)'
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Alter_Memberships_Add_Customer_FK.sql ...
03:54:08.030 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Create_Products_Table.sql ...
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:08.031 [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
)
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:08.031 [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"'
03:54:08.031 [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.'
03:54:08.031 [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'
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:08.031 [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.'
03:54:08.031 [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.'
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:08.031 [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).'
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:08.031 [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.'
03:54:08.031 [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.'
03:54:08.031 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:08.031 [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.'
03:54:08.031 [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.'
03:54:08.032 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Insert_Standard_Products.sql ...
03:54:08.032 [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."}]}'
)
03:54:08.033 [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."}]}'
)
03:54:08.033 [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."}]}'
)
03:54:08.033 [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."}]}'
)
03:54:08.034 [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."}]}'
)
03:54:08.034 [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',
    '{}'
)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Alter_Memberships_Add_Product_FK.sql ...
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:08.035 [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)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Orders_Table.sql (filename: V1.10__Create_Orders_Table.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql (filename: V1.11__Alter_Orders_Add_Customer_FK.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Create_Usages_Table.sql (filename: V1.12__Create_Usages_Table.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.13__Create_Function_Update_Quota_Table_Usage.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.14__Alter_Usages_Add_Unique_Constraint.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql (filename: V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql)
03:54:08.035 [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)
03:54:08.035 [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)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Memberships_Table.sql (filename: V1.3__Create_Memberships_Table.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql (filename: V1.4__Alter_Quotas_Add_Membership_FK.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Create_Customers_Table.sql (filename: V1.5__Create_Customers_Table.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql (filename: V1.6__Alter_Memberships_Add_Customer_FK.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Create_Products_Table.sql (filename: V1.7__Create_Products_Table.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Insert_Standard_Products.sql (filename: V1.8__Insert_Standard_Products.sql)
03:54:08.035 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql (filename: V1.9__Alter_Memberships_Add_Product_FK.sql)
03:54:08.036 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 16 migrations (execution time 00:00.014s)
03:54:08.036 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
03:54:08.040 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
03:54:08.040 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
03:54:08.041 [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
)
03:54:08.041 [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")
03:54:08.041 [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")
03:54:08.041 [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
)
03:54:08.044 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.044 [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")
03:54:08.044 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.044 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
03:54:08.045 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.045 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
03:54:08.046 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
03:54:08.047 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
03:54:08.047 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
03:54:08.048 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.049 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
03:54:08.050 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
03:54:08.050 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.050 [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,
    membershipId integer,
    owner text
)
03:54:08.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:08.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:08.052 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:08.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:08.053 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.053 [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.'
03:54:08.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:08.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:08.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:08.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:08.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.054 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:08.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:08.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:08.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:08.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:08.055 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.055 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
03:54:08.056 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.057 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
03:54:08.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:08.058 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:08.058 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:08.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:08.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:08.059 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:08.059 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
03:54:08.059 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.060 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Memberships Table
03:54:08.061 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:08.061 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.061 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:08.063 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.063 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:08.063 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.063 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:08.063 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.063 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.064 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.065 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:08.066 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.066 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:08.066 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.066 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:08.066 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.066 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Memberships Table
03:54:08.067 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.068 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:08.068 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:08.069 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.069 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:08.070 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.071 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Create Customers Table
03:54:08.071 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:08.072 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.072 [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
)
03:54:08.073 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.073 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:08.073 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.073 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:08.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:08.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
03:54:08.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:08.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
03:54:08.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.074 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.075 [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).'
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.075 [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.'
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.075 [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.'
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.075 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.076 [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'
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.076 [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)'
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.076 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Create Customers Table
03:54:08.077 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.078 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:08.078 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:08.079 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.079 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:08.080 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.080 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Create Products Table
03:54:08.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:08.081 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.081 [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
)
03:54:08.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:08.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:08.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:08.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.083 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:08.084 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.084 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:08.084 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.084 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:08.084 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.084 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:08.084 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.084 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.085 [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.'
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.085 [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'
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.085 [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.'
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.085 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
03:54:08.086 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.086 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
03:54:08.086 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.086 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:08.086 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.086 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
03:54:08.086 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.086 [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.'
03:54:08.086 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.086 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Create Products Table
03:54:08.087 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.088 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Insert Standard Products
03:54:08.088 [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."}]}'
)
03:54:08.088 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:08.088 [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."}]}'
)
03:54:08.089 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:08.089 [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."}]}'
)
03:54:08.089 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:08.089 [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."}]}'
)
03:54:08.089 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:08.089 [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."}]}'
)
03:54:08.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:08.090 [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',
    '{}'
)
03:54:08.090 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:08.090 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Insert Standard Products
03:54:08.091 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.092 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:08.092 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:08.093 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.093 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:08.093 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.094 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Orders Table
03:54:08.095 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:08.095 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.095 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:08.096 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.096 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:08.097 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.097 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:08.097 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.097 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:08.097 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.097 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.098 [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.'
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.098 [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.'
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.098 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.099 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Orders Table
03:54:08.100 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.101 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:08.101 [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
03:54:08.102 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.102 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:08.103 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.103 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Create Usages Table
03:54:08.104 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
03:54:08.104 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.104 [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
)
03:54:08.105 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.105 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:08.106 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.106 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:08.106 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.106 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:08.106 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.106 [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
03:54:08.107 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.107 [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.'
03:54:08.107 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.107 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:08.107 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.107 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
03:54:08.107 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.107 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:08.108 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.108 [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.'
03:54:08.108 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.108 [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.'
03:54:08.108 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.108 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
03:54:08.108 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.108 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:08.108 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.108 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Create Usages Table
03:54:08.109 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.110 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:08.110 [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
03:54:08.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.111 [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
03:54:08.111 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
03:54:08.111 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.111 [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()
03:54:08.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.112 [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
03:54:08.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.112 [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
03:54:08.112 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
03:54:08.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.112 [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()
03:54:08.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.112 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:08.113 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.114 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:08.114 [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)
03:54:08.115 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.115 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:08.115 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.116 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:08.116 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:08.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:08.117 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:08.118 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:08.119 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 16 migrations to schema "public" (execution time 00:00.078s)
03:54:08.119 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 125 of 399M
03:54:08.123 [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.
03:54:08.123 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@64beebb7
03:54:08.123 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
03:54:08.123 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
03:54:08.123 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@2a39fe6a
03:54:08.123 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@68759011
03:54:08.123 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
03:54:08.123 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
03:54:08.124 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
03:54:08.124 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
03:54:08.124 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
03:54:08.127 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
03:54:08.127 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
03:54:08.127 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
03:54:08.127 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
03:54:08.127 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
03:54:08.127 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
03:54:08.128 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@610fbe1c
03:54:08.128 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@46d0f89c{/,null,UNAVAILABLE} added {ServletHandler@570b2057{STOPPED},MANAGED}
03:54:08.128 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@a457c2b
03:54:08.128 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@16a6dc21{/,null,UNAVAILABLE} added {ServletHandler@5773d271{STOPPED},MANAGED}
03:54:08.204 [log:pid(10444)] INFO pg-f2a35df1-8342-47fb-883c-d1a1fe5f7584 - 2020-09-27 03:54:08.204 UTC [10460] ERROR:  duplicate key value violates unique constraint "usages_quotaid_instanceid_idx"
03:54:08.392 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:08.393 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:08.393 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:08.393 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:08.393 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:08.393 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:08.393 [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/
03:54:08.393 [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)
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:08.394 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:08.397 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
03:54:08.419 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.021s)
03:54:08.419 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 235 of 399M
03:54:08.521 [log:pid(10462)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:pg_ctl - waiting for server to shut down.... done
03:54:08.521 [log:pid(10462)] INFO init-f2a35df1-8342-47fb-883c-d1a1fe5f7584:pg_ctl - server stopped
03:54:08.530 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - f2a35df1-8342-47fb-883c-d1a1fe5f7584 shut down postmaster in 00:00:00.110
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.039 s - in org.dataone.bookkeeper.jdbi.UsageStoreTest
[INFO] Running org.dataone.bookkeeper.jdbi.CustomerStoreTest
03:54:09.180 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - The files belonging to this database system will be owned by user "jenkins".
03:54:09.180 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - This user must also own the server process.
03:54:09.180 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - 
03:54:09.180 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
03:54:09.180 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - The default text search configuration will be set to "english".
03:54:09.181 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - 
03:54:09.181 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - Data page checksums are disabled.
03:54:09.181 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - 
03:54:09.181 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - fixing permissions on existing directory /tmp/epg2391923531236121004 ... ok
03:54:09.181 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - creating subdirectories ... ok
03:54:09.189 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - selecting default max_connections ... 100
03:54:09.202 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - selecting default shared_buffers ... 128MB
03:54:09.202 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - selecting dynamic shared memory implementation ... posix
03:54:09.272 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - creating configuration files ... ok
03:54:09.363 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - running bootstrap script ... ok
03:54:09.765 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - performing post-bootstrap initialization ... ok
03:54:09.986 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - syncing data to disk ... ok
03:54:09.986 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - 
03:54:09.986 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - Success. You can now start the database server using:
03:54:09.986 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - 
03:54:09.986 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg2391923531236121004 -l logfile start
03:54:09.987 [log:pid(10466)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:initdb - 
03:54:09.987 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 96e09b42-5809-4182-8c2d-7a82e2578bcb initdb completed in 00:00:00.816
03:54:09.989 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 96e09b42-5809-4182-8c2d-7a82e2578bcb postmaster started as java.lang.UNIXProcess@4269aad7 on port 5432.  Waiting up to PT10S for server startup to finish.
03:54:10.000 [log:pid(10482)] INFO pg-96e09b42-5809-4182-8c2d-7a82e2578bcb - waiting for server to start....2020-09-27 03:54:09.999 UTC [10486] LOG:  listening on IPv6 address "::1", port 5432
03:54:10.000 [log:pid(10482)] INFO pg-96e09b42-5809-4182-8c2d-7a82e2578bcb - 2020-09-27 03:54:09.999 UTC [10486] LOG:  listening on IPv4 address "127.0.0.1", port 5432
03:54:10.000 [log:pid(10482)] INFO pg-96e09b42-5809-4182-8c2d-7a82e2578bcb - 2020-09-27 03:54:10.000 UTC [10486] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
03:54:10.038 [log:pid(10482)] INFO pg-96e09b42-5809-4182-8c2d-7a82e2578bcb - 2020-09-27 03:54:10.038 UTC [10487] LOG:  database system was shut down at 2020-09-27 03:54:09 UTC
03:54:10.041 [log:pid(10482)] INFO pg-96e09b42-5809-4182-8c2d-7a82e2578bcb - 2020-09-27 03:54:10.041 UTC [10486] LOG:  database system is ready to accept connections
03:54:10.091 [log:pid(10482)] INFO pg-96e09b42-5809-4182-8c2d-7a82e2578bcb - 2020-09-27 03:54:10.091 UTC [10494] LOG:  incomplete startup packet
03:54:10.094 [log:pid(10482)] INFO pg-96e09b42-5809-4182-8c2d-7a82e2578bcb -  done
03:54:10.094 [log:pid(10482)] INFO pg-96e09b42-5809-4182-8c2d-7a82e2578bcb - server started
03:54:10.098 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 96e09b42-5809-4182-8c2d-7a82e2578bcb postmaster startup finished in 00:00:00.110
03:54:10.105 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
03:54:10.105 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
03:54:10.106 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:10.107 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:10.107 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:10.107 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:10.107 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:10.107 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:10.107 [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/
03:54:10.107 [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)
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:10.108 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:10.112 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
03:54:10.112 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Orders_Table.sql ...
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:10.113 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:10.113 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:10.114 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Orders_Add_Customer_FK.sql ...
03:54:10.114 [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
03:54:10.114 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Create_Usages_Table.sql ...
03:54:10.114 [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
03:54:10.114 [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
)
03:54:10.114 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:10.114 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:10.114 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:10.114 [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
03:54:10.114 [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.'
03:54:10.114 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:10.114 [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".'
03:54:10.114 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:10.114 [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.'
03:54:10.114 [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.'
03:54:10.114 [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.'
03:54:10.114 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:10.115 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.13__Create_Function_Update_Quota_Table_Usage.sql ...
03:54:10.115 [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
03:54:10.115 [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
03:54:10.115 [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()
03:54:10.115 [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
03:54:10.115 [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
03:54:10.115 [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()
03:54:10.116 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.14__Alter_Usages_Add_Unique_Constraint.sql ...
03:54:10.116 [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)
03:54:10.116 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql ...
03:54:10.116 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:10.116 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
03:54:10.117 [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
03:54:10.117 [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,
    membershipId integer,
    owner text
)
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 20: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:10.117 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:10.118 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
03:54:10.118 [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, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:10.118 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:10.118 [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, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:10.118 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Memberships_Table.sql ...
03:54:10.118 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:10.119 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Alter_Quotas_Add_Membership_FK.sql ...
03:54:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Create_Customers_Table.sql ...
03:54:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:10.120 [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
)
03:54:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:10.120 [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.'
03:54:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:10.120 [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".'
03:54:10.120 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:10.120 [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).'
03:54:10.120 [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.'
03:54:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:10.121 [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".'
03:54:10.121 [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'
03:54:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:10.121 [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.'
03:54:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:10.121 [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'
03:54:10.121 [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)'
03:54:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Alter_Memberships_Add_Customer_FK.sql ...
03:54:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:10.121 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Create_Products_Table.sql ...
03:54:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:10.122 [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
)
03:54:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:10.122 [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"'
03:54:10.122 [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.'
03:54:10.122 [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'
03:54:10.122 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:10.122 [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.'
03:54:10.123 [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.'
03:54:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:10.123 [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).'
03:54:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:10.123 [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.'
03:54:10.123 [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.'
03:54:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:10.123 [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.'
03:54:10.123 [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.'
03:54:10.123 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Insert_Standard_Products.sql ...
03:54:10.124 [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."}]}'
)
03:54:10.124 [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."}]}'
)
03:54:10.125 [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."}]}'
)
03:54:10.125 [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."}]}'
)
03:54:10.126 [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."}]}'
)
03:54:10.126 [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',
    '{}'
)
03:54:10.127 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Alter_Memberships_Add_Product_FK.sql ...
03:54:10.127 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:10.127 [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)
03:54:10.127 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Orders_Table.sql (filename: V1.10__Create_Orders_Table.sql)
03:54:10.127 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql (filename: V1.11__Alter_Orders_Add_Customer_FK.sql)
03:54:10.127 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Create_Usages_Table.sql (filename: V1.12__Create_Usages_Table.sql)
03:54:10.127 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.13__Create_Function_Update_Quota_Table_Usage.sql)
03:54:10.128 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.14__Alter_Usages_Add_Unique_Constraint.sql)
03:54:10.128 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql (filename: V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql)
03:54:10.128 [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)
03:54:10.128 [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)
03:54:10.128 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Memberships_Table.sql (filename: V1.3__Create_Memberships_Table.sql)
03:54:10.128 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql (filename: V1.4__Alter_Quotas_Add_Membership_FK.sql)
03:54:10.128 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Create_Customers_Table.sql (filename: V1.5__Create_Customers_Table.sql)
03:54:10.128 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql (filename: V1.6__Alter_Memberships_Add_Customer_FK.sql)
03:54:10.128 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Create_Products_Table.sql (filename: V1.7__Create_Products_Table.sql)
03:54:10.128 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Insert_Standard_Products.sql (filename: V1.8__Insert_Standard_Products.sql)
03:54:10.128 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql (filename: V1.9__Alter_Memberships_Add_Product_FK.sql)
03:54:10.129 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 16 migrations (execution time 00:00.016s)
03:54:10.129 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
03:54:10.135 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
03:54:10.135 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
03:54:10.136 [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
)
03:54:10.136 [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")
03:54:10.136 [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")
03:54:10.136 [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
)
03:54:10.150 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.151 [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")
03:54:10.151 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.151 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
03:54:10.152 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.152 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
03:54:10.154 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
03:54:10.154 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
03:54:10.155 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
03:54:10.156 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.157 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
03:54:10.157 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
03:54:10.158 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.158 [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,
    membershipId integer,
    owner text
)
03:54:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.160 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:10.161 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.161 [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.'
03:54:10.162 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.162 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:10.162 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.162 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:10.162 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.162 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:10.162 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.162 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.163 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
03:54:10.164 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.165 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
03:54:10.166 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:10.166 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:10.167 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:10.167 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:10.167 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:10.167 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:10.167 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
03:54:10.168 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.169 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Memberships Table
03:54:10.169 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:10.170 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.170 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:10.171 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.171 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:10.171 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.171 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.172 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.173 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.174 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Memberships Table
03:54:10.175 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.176 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:10.177 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:10.178 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.178 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:10.179 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.180 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Create Customers Table
03:54:10.180 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:10.181 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.181 [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
)
03:54:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.182 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
03:54:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.183 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
03:54:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.184 [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).'
03:54:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.184 [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.'
03:54:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.184 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
03:54:10.185 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.185 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
03:54:10.185 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.185 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:10.185 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.185 [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.'
03:54:10.185 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.185 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:10.185 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.185 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:10.185 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.185 [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'
03:54:10.186 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.186 [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)'
03:54:10.186 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.186 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:10.186 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.186 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:10.186 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.186 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:10.186 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.186 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Create Customers Table
03:54:10.187 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.188 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:10.188 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:10.189 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.189 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:10.190 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.191 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Create Products Table
03:54:10.191 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:10.192 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.192 [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
)
03:54:10.193 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.193 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:10.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:10.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:10.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.194 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:10.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:10.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:10.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.195 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.196 [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.'
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.196 [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'
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.196 [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.'
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.196 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:10.197 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
03:54:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.198 [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.'
03:54:10.198 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.198 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Create Products Table
03:54:10.199 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.199 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Insert Standard Products
03:54:10.200 [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."}]}'
)
03:54:10.204 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:10.204 [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."}]}'
)
03:54:10.204 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:10.204 [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."}]}'
)
03:54:10.205 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:10.205 [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."}]}'
)
03:54:10.205 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:10.205 [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."}]}'
)
03:54:10.206 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:10.206 [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',
    '{}'
)
03:54:10.206 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:10.206 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Insert Standard Products
03:54:10.207 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.208 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:10.209 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:10.210 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.210 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:10.210 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.211 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Orders Table
03:54:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:10.212 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.212 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:10.214 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.214 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:10.214 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.214 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:10.215 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.215 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:10.215 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.215 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:10.215 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.215 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:10.216 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.216 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:10.216 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.216 [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.'
03:54:10.216 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.216 [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.'
03:54:10.216 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.216 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:10.216 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.216 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:10.216 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.216 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.217 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:10.218 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.218 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:10.218 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.218 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Orders Table
03:54:10.218 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.219 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:10.220 [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
03:54:10.221 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.221 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:10.221 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.222 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Create Usages Table
03:54:10.223 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
03:54:10.223 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.223 [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
)
03:54:10.224 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.224 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:10.225 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.225 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:10.225 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.225 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:10.226 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.226 [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
03:54:10.226 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.227 [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.'
03:54:10.227 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.227 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:10.227 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.227 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
03:54:10.227 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.227 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:10.227 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.227 [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.'
03:54:10.227 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.227 [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.'
03:54:10.228 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.228 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
03:54:10.228 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.228 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:10.228 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.228 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Create Usages Table
03:54:10.228 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.229 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:10.230 [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
03:54:10.231 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.231 [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
03:54:10.232 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
03:54:10.232 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.232 [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()
03:54:10.232 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.232 [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
03:54:10.232 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.232 [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
03:54:10.233 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
03:54:10.233 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.233 [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()
03:54:10.233 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.233 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:10.234 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.238 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:10.239 [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)
03:54:10.239 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.239 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:10.240 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.241 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:10.241 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:10.241 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:10.241 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:10.242 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:10.243 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 16 migrations to schema "public" (execution time 00:00.108s)
03:54:10.243 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 256 of 399M
03:54:10.246 [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.
03:54:10.246 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@64beebb7
03:54:10.246 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
03:54:10.246 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
03:54:10.246 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@2a39fe6a
03:54:10.246 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@68759011
03:54:10.246 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
03:54:10.246 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
03:54:10.247 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
03:54:10.247 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
03:54:10.247 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
03:54:10.249 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
03:54:10.250 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
03:54:10.250 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
03:54:10.250 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
03:54:10.250 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
03:54:10.250 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
03:54:10.251 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@2c2a903f
03:54:10.251 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@7d537616{/,null,UNAVAILABLE} added {ServletHandler@604c7e9b{STOPPED},MANAGED}
03:54:10.251 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@19d27c27
03:54:10.251 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@6181bc4a{/,null,UNAVAILABLE} added {ServletHandler@70485aa{STOPPED},MANAGED}
03:54:10.423 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:10.423 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:10.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:10.423 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:10.424 [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/
03:54:10.424 [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)
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:10.424 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:10.429 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
03:54:10.454 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.025s)
03:54:10.455 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 48 of 399M
03:54:10.457 [log:pid(10482)] INFO pg-96e09b42-5809-4182-8c2d-7a82e2578bcb - 2020-09-27 03:54:10.457 UTC [10486] LOG:  received fast shutdown request
03:54:10.557 [log:pid(10500)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:pg_ctl - waiting for server to shut down.... done
03:54:10.557 [log:pid(10500)] INFO init-96e09b42-5809-4182-8c2d-7a82e2578bcb:pg_ctl - server stopped
03:54:10.557 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - 96e09b42-5809-4182-8c2d-7a82e2578bcb shut down postmaster in 00:00:00.102
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.698 s - in org.dataone.bookkeeper.jdbi.CustomerStoreTest
[INFO] Running org.dataone.bookkeeper.EmbeddedPostgresqlTest
03:54:10.879 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - The files belonging to this database system will be owned by user "jenkins".
03:54:10.879 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - This user must also own the server process.
03:54:10.879 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - 
03:54:10.879 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - The database cluster will be initialized with locale "en_US.UTF-8".
03:54:10.879 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - The default text search configuration will be set to "english".
03:54:10.879 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - 
03:54:10.879 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - Data page checksums are disabled.
03:54:10.879 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - 
03:54:10.879 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - fixing permissions on existing directory /tmp/epg2563065828222725680 ... ok
03:54:10.879 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - creating subdirectories ... ok
03:54:10.888 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - selecting default max_connections ... 100
03:54:10.900 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - selecting default shared_buffers ... 128MB
03:54:10.900 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - selecting dynamic shared memory implementation ... posix
03:54:10.967 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - creating configuration files ... ok
03:54:11.073 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - running bootstrap script ... ok
03:54:11.503 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - performing post-bootstrap initialization ... ok
03:54:11.730 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - syncing data to disk ... ok
03:54:11.730 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - 
03:54:11.730 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - Success. You can now start the database server using:
03:54:11.730 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - 
03:54:11.730 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb -     /tmp/embedded-pg/PG-06e3a92a2edb6ddd6dbdf5602d0252ca/bin/pg_ctl -D /tmp/epg2563065828222725680 -l logfile start
03:54:11.730 [log:pid(10504)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:initdb - 
03:54:11.731 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - fa930c4f-9ffb-450a-83ad-9c9fe3664a17 initdb completed in 00:00:00.859
03:54:11.733 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - fa930c4f-9ffb-450a-83ad-9c9fe3664a17 postmaster started as java.lang.UNIXProcess@3b2db389 on port 5432.  Waiting up to PT10S for server startup to finish.
03:54:11.743 [log:pid(10518)] INFO pg-fa930c4f-9ffb-450a-83ad-9c9fe3664a17 - waiting for server to start....2020-09-27 03:54:11.743 UTC [10522] LOG:  listening on IPv6 address "::1", port 5432
03:54:11.743 [log:pid(10518)] INFO pg-fa930c4f-9ffb-450a-83ad-9c9fe3664a17 - 2020-09-27 03:54:11.743 UTC [10522] LOG:  listening on IPv4 address "127.0.0.1", port 5432
03:54:11.743 [log:pid(10518)] INFO pg-fa930c4f-9ffb-450a-83ad-9c9fe3664a17 - 2020-09-27 03:54:11.743 UTC [10522] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
03:54:11.778 [log:pid(10518)] INFO pg-fa930c4f-9ffb-450a-83ad-9c9fe3664a17 - 2020-09-27 03:54:11.778 UTC [10525] LOG:  database system was shut down at 2020-09-27 03:54:11 UTC
03:54:11.780 [log:pid(10518)] INFO pg-fa930c4f-9ffb-450a-83ad-9c9fe3664a17 - 2020-09-27 03:54:11.780 UTC [10522] LOG:  database system is ready to accept connections
03:54:11.834 [log:pid(10518)] INFO pg-fa930c4f-9ffb-450a-83ad-9c9fe3664a17 - 2020-09-27 03:54:11.834 UTC [10532] LOG:  incomplete startup packet
03:54:11.838 [log:pid(10518)] INFO pg-fa930c4f-9ffb-450a-83ad-9c9fe3664a17 -  done
03:54:11.838 [log:pid(10518)] INFO pg-fa930c4f-9ffb-450a-83ad-9c9fe3664a17 - server started
03:54:11.840 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - fa930c4f-9ffb-450a-83ad-9c9fe3664a17 postmaster startup finished in 00:00:00.108
03:54:11.846 [main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 10.6)
03:54:11.846 [main] DEBUG org.flywaydb.core.internal.database.DatabaseFactory - Driver  : PostgreSQL JDBC Driver 42.2.6
03:54:11.847 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:11.847 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:11.847 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:11.847 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:11.848 [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/
03:54:11.848 [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)
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:11.848 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:11.851 [main] DEBUG org.flywaydb.core.internal.command.DbValidate - Validating migrations ...
03:54:11.851 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.0__Create_Bookkeeper_Database.sql ...
03:54:11.851 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.10__Create_Orders_Table.sql ...
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:11.852 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN orders.amount IS 'The order amount in the smallest unit of the currency.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN orders.amountReturned IS 'The order amount returned in the smallest unit of the currency.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 37: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.11__Alter_Orders_Add_Customer_FK.sql ...
03:54:11.852 [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
03:54:11.852 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.12__Create_Usages_Table.sql ...
03:54:11.853 [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
03:54:11.853 [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
)
03:54:11.853 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 16: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:11.853 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:11.853 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 19: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:11.853 [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
03:54:11.853 [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.'
03:54:11.853 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:11.853 [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".'
03:54:11.853 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:11.853 [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.'
03:54:11.853 [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.'
03:54:11.853 [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.'
03:54:11.853 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:11.853 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.13__Create_Function_Update_Quota_Table_Usage.sql ...
03:54:11.853 [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
03:54:11.853 [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
03:54:11.853 [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()
03:54:11.855 [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
03:54:11.855 [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
03:54:11.855 [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()
03:54:11.855 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.14__Alter_Usages_Add_Unique_Constraint.sql ...
03:54:11.856 [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)
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql ...
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.1__Create_Quotas_Table.sql ...
03:54:11.856 [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
03:54:11.856 [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,
    membershipId integer,
    owner text
)
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 18: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 20: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 21: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 22: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: COMMENT ON TABLE quotas IS 'Quotas limiting resources for products per customer. Quotas may be associated with products or customers by their ids.'
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 25: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:11.856 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:11.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.2__Insert_Standard_Quotas.sql ...
03:54:11.857 [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, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:11.857 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:11.857 [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, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:11.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.3__Create_Memberships_Table.sql ...
03:54:11.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:11.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 7: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:11.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:11.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 30: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:11.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:11.857 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 34: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 35: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 38: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 40: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 43: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 48: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 49: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 50: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 51: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 52: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 53: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.4__Alter_Quotas_Add_Membership_FK.sql ...
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.5__Create_Customers_Table.sql ...
03:54:11.858 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:11.859 [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
)
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:11.859 [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.'
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:11.859 [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".'
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 33: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:11.859 [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).'
03:54:11.859 [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.'
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:11.859 [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".'
03:54:11.859 [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'
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:11.859 [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.'
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 42: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:11.859 [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'
03:54:11.859 [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)'
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 45: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 46: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 47: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.6__Alter_Memberships_Add_Customer_FK.sql ...
03:54:11.859 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.7__Create_Products_Table.sql ...
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:11.860 [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
)
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 24: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 26: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 27: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 28: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 29: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 31: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 32: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:11.860 [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"'
03:54:11.860 [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.'
03:54:11.860 [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'
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 36: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:11.860 [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.'
03:54:11.860 [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.'
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 39: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:11.860 [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).'
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 41: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:11.860 [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.'
03:54:11.860 [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.'
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 44: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:11.860 [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.'
03:54:11.860 [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.'
03:54:11.860 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.8__Insert_Standard_Products.sql ...
03:54:11.861 [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."}]}'
)
03:54:11.861 [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."}]}'
)
03:54:11.862 [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."}]}'
)
03:54:11.862 [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."}]}'
)
03:54:11.863 [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."}]}'
)
03:54:11.863 [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',
    '{}'
)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing V1.9__Alter_Memberships_Add_Product_FK.sql ...
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Found statement at line 4: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:11.863 [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)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.10__Create_Orders_Table.sql (filename: V1.10__Create_Orders_Table.sql)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql (filename: V1.11__Alter_Orders_Add_Customer_FK.sql)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.12__Create_Usages_Table.sql (filename: V1.12__Create_Usages_Table.sql)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql (filename: V1.13__Create_Function_Update_Quota_Table_Usage.sql)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql (filename: V1.14__Alter_Usages_Add_Unique_Constraint.sql)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql (filename: V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql)
03:54:11.863 [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)
03:54:11.863 [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)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.3__Create_Memberships_Table.sql (filename: V1.3__Create_Memberships_Table.sql)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql (filename: V1.4__Alter_Quotas_Add_Membership_FK.sql)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.5__Create_Customers_Table.sql (filename: V1.5__Create_Customers_Table.sql)
03:54:11.863 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql (filename: V1.6__Alter_Memberships_Add_Customer_FK.sql)
03:54:11.864 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.7__Create_Products_Table.sql (filename: V1.7__Create_Products_Table.sql)
03:54:11.864 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.8__Insert_Standard_Products.sql (filename: V1.8__Insert_Standard_Products.sql)
03:54:11.864 [main] DEBUG org.flywaydb.core.internal.scanner.Scanner - Filtering out resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql (filename: V1.9__Alter_Memberships_Add_Product_FK.sql)
03:54:11.864 [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 16 migrations (execution time 00:00.013s)
03:54:11.865 [main] DEBUG org.flywaydb.core.internal.command.DbSchemas - Schema "public" already exists. Skipping schema creation.
03:54:11.869 [main] INFO org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Creating Schema History table: "public"."flyway_schema_history"
03:54:11.869 [main] DEBUG org.flywaydb.core.internal.sqlscript.SqlScript - Parsing createMetaDataTable.sql ...
03:54:11.869 [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
)
03:54:11.869 [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")
03:54:11.870 [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")
03:54:11.870 [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
)
03:54:11.872 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.872 [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")
03:54:11.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX "flyway_schema_history_s_idx" ON "public"."flyway_schema_history" ("success")
03:54:11.873 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.873 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Created Schema History table: "public"."flyway_schema_history"
03:54:11.875 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >>
03:54:11.875 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.0 - Create Bookkeeper Database
03:54:11.875 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.0 - Create Bookkeeper Database
03:54:11.876 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.877 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.1 - Create Quotas Table
03:54:11.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the quotas table
CREATE SEQUENCE IF NOT EXISTS quotas_id_seq
03:54:11.878 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.878 [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,
    membershipId integer,
    owner text
)
03:54:11.880 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.880 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE quotas_id_seq OWNED BY quotas.id
03:54:11.880 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.880 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_quotaType_idx ON quotas USING btree(quotaType)
03:54:11.880 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.880 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_membershipId_idx ON quotas USING btree(membershipId)
03:54:11.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX quotas_owner_idx ON quotas USING btree(owner)
03:54:11.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.881 [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.'
03:54:11.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.id IS 'The unique quota identifier'
03:54:11.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.object IS 'The serialized object type, set to "quota"'
03:54:11.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.881 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.quotaType IS 'The quota type'
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.softLimit IS 'The soft limit of the resource.'
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.hardLimit IS 'The hard limit of the resource.'
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.totalUsage IS 'The current observed total usage of the quota.'
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.unit IS 'The named unit of the quota.'
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.membershipId IS 'The membership id to which the quota is applied.'
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN quotas.owner IS 'The owner identifier to which the quota is applied.'
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.882 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.1 - Create Quotas Table
03:54:11.883 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.884 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.2 - Insert Standard Quotas
03:54:11.884 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- 1GB base storage limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'storage', 1073741824.0, 1181116006.4, NULL, 'byte', NULL, NULL)
03:54:11.885 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:11.885 [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, membershipId, owner)
    VALUES ('quota', 'repository_storage', 1099511627776.0, 1209462790553.6, NULL, 'byte', NULL,
    NULL)
03:54:11.885 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:11.885 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: -- Single base branded portal limit
INSERT INTO quotas (object, quotaType, softLimit, hardLimit, totalUsage, unit, membershipId, owner)
    VALUES ('quota', 'portal', 1.0, 1.0, NULL, 'portal', NULL, NULL)
03:54:11.885 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:11.885 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.2 - Insert Standard Quotas
03:54:11.886 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.887 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.3 - Create Memberships Table
03:54:11.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the memberships table
CREATE SEQUENCE memberships_id_seq
03:54:11.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.887 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE TABLE IF NOT EXISTS memberships (
    id integer DEFAULT nextval('memberships_id_seq') PRIMARY KEY,
    object text NOT NULL,
    --- billingCycleAnchor timestamp with time zone,
    canceledAt timestamp with time zone,
    collectionMethod text NOT NULL,
    created timestamp with time zone,
    --- currentPeriodEnd timestamp with time zone,
    --- currentPeriodStart timestamp with time zone,
    customerId integer NOT NULL,
    --- daysUntilDue integer,
    discount json,
    --- endedAt timestamp with time zone,
    --- latestInvoice json,
    metadata json,
    productId integer NOT NULL,
    quantity integer,
    startDate timestamp with time zone,
    status text NOT NULL,
    trialEnd timestamp with time zone,
    trialStart timestamp with time zone
)
03:54:11.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE memberships_id_seq OWNED BY memberships.id
03:54:11.888 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_customer_id_idx ON memberships USING btree(customerId)
03:54:11.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX memberships_status_idx ON memberships USING btree(status)
03:54:11.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  memberships IS 'Memberships with products and their quotas by customers.'
03:54:11.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.id IS 'The unique membership identifier.'
03:54:11.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.889 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.object IS 'The serialized object type, set to "membership".'
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.billingCycleAnchor IS 'The timestamp used to calculate membership billing cycles.';
COMMENT ON COLUMN memberships.canceledAt IS 'The timestamp when the membership was canceled.'
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.collectionMethod IS 'The payment collection (charge_automatically, or send_invoice).'
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.created IS 'The timestamp when the membership was created.'
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.currentPeriodEnd IS 'The timestamp when the current membership period ends.';
--- COMMENT ON COLUMN memberships.currentPeriodStart IS 'The timestamp when the current membership period ends.';
COMMENT ON COLUMN memberships.customerId IS 'The customer identifier.'
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- COMMENT ON COLUMN memberships.daysUntilDue IS 'The number of days until the membership payment is due.';
--- COMMENT ON COLUMN memberships.discount IS 'The discount JSON object applied to the membership.';
--- COMMENT ON COLUMN memberships.endedAt IS 'The timestamp when the membership ended.';
--- COMMENT ON COLUMN memberships.latestInvoice IS 'The latest invoice JSON object for the membership.';
COMMENT ON COLUMN memberships.metadata IS 'The membership metadata, stored as a JSON object (undefined as of yet)'
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.productId IS 'The purchased product identifier.'
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.quantity IS 'The quantity of the purchased product.'
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.startDate IS 'The timestamp when the membership starts.'
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.status  IS 'The membership status'
03:54:11.890 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialEnd  IS 'The timestamp when the membership trial starts.'
03:54:11.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN memberships.trialStart  IS 'The timestamp when the membership trial ends.'
03:54:11.891 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.891 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.3 - Create Memberships Table
03:54:11.891 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.892 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:11.894 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the membership id foreign key constraint
ALTER TABLE quotas
    ADD CONSTRAINT quotas_membership_id_fk
    FOREIGN KEY (membershipId) REFERENCES memberships (id) ON DELETE CASCADE
03:54:11.895 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.895 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.4 - Alter Quotas Add Membership FK
03:54:11.896 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.897 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.5 - Create Customers Table
03:54:11.897 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the customers table
CREATE SEQUENCE customers_id_seq
03:54:11.897 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.897 [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
)
03:54:11.899 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.899 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE customers_id_seq OWNED BY customers.id
03:54:11.899 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.899 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_subject_idx ON customers USING btree(subject)
03:54:11.899 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.899 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX customers_email_idx ON customers USING btree(email)
03:54:11.899 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.899 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE customers IS 'Customers that have ordered products and have quotas.'
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.id IS 'The unique customer identifier.'
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.object IS 'The serialized object type, set to "customer".'
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.subject IS 'The unique customer Subject identifier.'
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.900 [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).'
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.900 [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.'
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.created IS 'The customer creation date.'
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.currency IS 'The customer currency, defaults to "USD".'
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.delinquent IS 'The customer delinquency status, true or false'
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.description IS 'The customer description'
03:54:11.900 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.900 [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.'
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.email IS 'The customer email address.'
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.invoicePrefix IS 'The customer invoice prefix'
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.901 [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'
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.901 [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)'
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.givenName IS 'The customer given name'
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.surName IS 'The customer surname'
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN customers.phone IS 'The customer phone'
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.901 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.5 - Create Customers Table
03:54:11.902 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.903 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:11.903 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the customer id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_customers_id_fk
    FOREIGN KEY (customerId) REFERENCES customers (id) ON DELETE CASCADE
03:54:11.904 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.904 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.6 - Alter Memberships Add Customer FK
03:54:11.905 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.905 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.7 - Create Products Table
03:54:11.906 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the products table
CREATE SEQUENCE products_id_seq
03:54:11.906 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.906 [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
)
03:54:11.907 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.907 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE products_id_seq OWNED BY products.id
03:54:11.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_active_idx ON products USING btree(active)
03:54:11.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_name_idx ON products USING btree(name)
03:54:11.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.908 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_caption_idx ON products USING btree(caption)
03:54:11.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX products_description_idx ON products USING btree(description)
03:54:11.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  products IS 'Products that are offered as services.'
03:54:11.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.id IS 'The unique product identifier'
03:54:11.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.object IS 'The serialized object type, set to "product"'
03:54:11.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.909 [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.'
03:54:11.909 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.910 [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'
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.name IS 'The product name.'
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.caption IS 'The product caption, used for display.'
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.910 [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.'
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.description IS 'The product general description.'
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.interval IS 'The product payment interval (day, week, month, year).'
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.created IS 'The product creation date.'
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.statementDescriptor IS 'The product statement descriptor used on charge statements.'
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.910 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.type IS 'The product type, either service or good.'
03:54:11.911 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.911 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.unitLabel IS 'The product unit label.'
03:54:11.911 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.911 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN products.url IS 'The product URL used for more information.'
03:54:11.911 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.911 [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.'
03:54:11.911 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.911 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.7 - Create Products Table
03:54:11.912 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.912 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.8 - Insert Standard Products
03:54:11.913 [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."}]}'
)
03:54:11.913 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:11.913 [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."}]}'
)
03:54:11.914 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:11.914 [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."}]}'
)
03:54:11.914 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:11.914 [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."}]}'
)
03:54:11.914 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:11.915 [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."}]}'
)
03:54:11.915 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:11.915 [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',
    '{}'
)
03:54:11.915 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 1
03:54:11.915 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.8 - Insert Standard Products
03:54:11.916 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.917 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:11.917 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add the product id foreign key constraint
ALTER TABLE memberships
    ADD CONSTRAINT memberships_products_id_fk
    FOREIGN KEY (productId) REFERENCES products (id) ON DELETE CASCADE
03:54:11.918 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.918 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.9 - Alter Memberships Add Product FK
03:54:11.919 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.919 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.10 - Create Orders Table
03:54:11.920 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the orders table
CREATE SEQUENCE orders_id_seq
03:54:11.920 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.920 [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,
    email text,
    items json,
    metadata json,
    status text,
    statusTransitions json,
    updated timestamp with time zone
)
03:54:11.921 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.921 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_customer_idx ON orders USING btree(customer)
03:54:11.922 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.922 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_email_idx ON orders USING btree(email)
03:54:11.922 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.922 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX orders_status_idx ON orders USING btree(status)
03:54:11.922 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.922 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON TABLE  orders IS 'Orders of products by customers.'
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.id IS 'The unique order identifier.'
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.object IS 'The serialized object type, set to "order".'
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.923 [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.'
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.923 [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.'
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.charge IS 'The order transaction charge JSON object.'
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.created IS 'The order creation date.'
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.currency IS 'The order currency code.'
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.923 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.customer IS 'The order customer identifier.'
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.email IS 'The order customer email.'
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.items IS 'The order items list JSON object.'
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.metadata IS 'The order metadata JSON object.'
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.status IS 'The order status (created, paid, canceled, fulfilled, returned.'
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.statusTransitions IS 'The order status/date transitions JSON object'
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN orders.updated IS 'The order update date.'
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.924 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.10 - Create Orders Table
03:54:11.925 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.926 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:11.926 [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
03:54:11.927 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.927 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.11 - Alter Orders Add Customer FK
03:54:11.928 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.929 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.12 - Create Usages Table
03:54:11.929 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Create the usages table
CREATE SEQUENCE IF NOT EXISTS usages_id_seq
03:54:11.929 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.929 [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
)
03:54:11.930 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.930 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: ALTER SEQUENCE usages_id_seq OWNED BY usages.id
03:54:11.931 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.931 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_quotaId_idx ON usages USING btree(quotaId)
03:54:11.931 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.931 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: CREATE INDEX usages_instanceId_idx ON usages USING btree(instanceId)
03:54:11.931 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.931 [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
03:54:11.932 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.932 [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.'
03:54:11.932 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.932 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.id IS 'The unique usage identifier.'
03:54:11.932 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.932 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.object IS 'The serialized object type, set to "usage".'
03:54:11.932 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.932 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.quotaId IS 'The quota identifier.'
03:54:11.932 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.932 [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.'
03:54:11.933 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.933 [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.'
03:54:11.933 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.933 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.status IS 'The status of the usage, active or inactive.'
03:54:11.933 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.933 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: COMMENT ON COLUMN usages.nodeId IS 'The quota node identifier".'
03:54:11.933 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.933 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.12 - Create Usages Table
03:54:11.934 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.935 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:11.935 [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
03:54:11.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.936 [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
03:54:11.936 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_insert_or_update" for relation "usages" does not exist, skipping
03:54:11.936 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.936 [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()
03:54:11.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.937 [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
03:54:11.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.937 [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
03:54:11.937 [main] INFO org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - DB: trigger "update_quotas_usage_on_delete" for relation "usages" does not exist, skipping
03:54:11.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.937 [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()
03:54:11.937 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.937 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.13 - Create Function Update Quota Table Usage
03:54:11.938 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.939 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:11.939 [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)
03:54:11.939 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.939 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.14 - Alter Usages Add Unique Constraint
03:54:11.940 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.941 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:11.941 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Executing SQL: --- Add a unique constraint to the quotas table for the 'membershipId' + 'quotaType' columns
CREATE UNIQUE INDEX quotas_membership_id_quota_type_idx
    ON quotas USING btree(membershipId, quotaType)
03:54:11.942 [main] DEBUG org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor - Update Count: 0
03:54:11.942 [main] DEBUG org.flywaydb.core.internal.command.DbMigrate - Successfully completed migration of schema "public" to version 1.15 - Alter Quotas Add Unique Constraint MembershipId QuotaType
03:54:11.942 [main] DEBUG org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory - Schema History table "public"."flyway_schema_history" successfully updated to reflect changes
03:54:11.943 [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 16 migrations to schema "public" (execution time 00:00.075s)
03:54:11.944 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 70 of 399M
03:54:11.947 [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.
03:54:11.947 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.validation.valuehandling.GuavaOptionalValueExtractor@64beebb7
03:54:11.947 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ConstraintValidatorFactory of type io.dropwizard.jersey.validation.MutableValidatorFactory
03:54:11.947 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Setting custom ParameterNameProvider of type io.dropwizard.jersey.validation.JerseyParameterNameProvider
03:54:11.948 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.NonEmptyStringParamValueExtractor@2a39fe6a
03:54:11.948 [main] DEBUG org.hibernate.validator.internal.engine.AbstractConfigurationImpl - Adding value extractor io.dropwizard.jersey.validation.ParamValueExtractor@68759011
03:54:11.948 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.
03:54:11.948 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL
03:54:11.948 [main] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader
03:54:11.949 [main] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.
03:54:11.950 [main] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
03:54:11.952 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
03:54:11.953 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
03:54:11.953 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
03:54:11.953 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
03:54:11.953 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
03:54:11.953 [main] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryConfigurationHelper - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
03:54:11.954 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@218f2f51
03:54:11.954 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@1d9af731{/,null,UNAVAILABLE} added {ServletHandler@39afe59f{STOPPED},MANAGED}
03:54:11.954 [main] DEBUG org.eclipse.jetty.util.DecoratedObjectFactory - Adding Decorator: org.eclipse.jetty.util.DeprecationWarning@16f34376
03:54:11.954 [main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - i.d.j.MutableServletContextHandler@4ede035e{/,null,UNAVAILABLE} added {ServletHandler@43756cb{STOPPED},MANAGED}
03:54:11.968 [main] DEBUG org.flywaydb.core.Flyway - DDL Transactions Supported: true
03:54:11.969 [main] DEBUG org.flywaydb.core.Flyway - Schema: public
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classpath resources at 'classpath:db/migrations' ...
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Determining location urls for classpath:db/migrations using ClassLoader sun.misc.Launcher$AppClassLoader@7f31245a ...
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning URL: file:/var/lib/jenkins/jobs/bookkeeper-unstable/workspace/target/classes/db/migrations
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - JBoss VFS v2 available: false
03:54:11.969 [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/
03:54:11.969 [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)
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.0__Create_Bookkeeper_Database.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.10__Create_Orders_Table.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.11__Alter_Orders_Add_Customer_FK.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.12__Create_Usages_Table.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.13__Create_Function_Update_Quota_Table_Usage.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.14__Alter_Usages_Add_Unique_Constraint.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.15__Alter_Quotas_Add_Unique_Constraint_MembershipId_QuotaType.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.1__Create_Quotas_Table.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.2__Insert_Standard_Quotas.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.3__Create_Memberships_Table.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.4__Alter_Quotas_Add_Membership_FK.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.5__Create_Customers_Table.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.6__Alter_Memberships_Add_Customer_FK.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.7__Create_Products_Table.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.8__Insert_Standard_Products.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Found resource: db/migrations/V1.9__Alter_Memberships_Add_Product_FK.sql
03:54:11.969 [main] DEBUG org.flywaydb.core.internal.scanner.classpath.ClassPathScanner - Scanning for classes at classpath:db/migrations
03:54:11.970 [main] DEBUG org.flywaydb.core.internal.callback.SqlScriptCallbackFactory - Scanning for SQL callbacks ...
03:54:11.970 [main] DEBUG org.flywaydb.core.internal.util.FeatureDetector - Spring Jdbc available: false
03:54:11.973 [main] DEBUG org.flywaydb.core.internal.command.DbClean - Cleaning schema "public" ...
03:54:11.993 [main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema "public" (execution time 00:00.020s)
03:54:11.994 [main] DEBUG org.flywaydb.core.Flyway - Memory usage: 75 of 399M
03:54:11.995 [log:pid(10518)] INFO pg-fa930c4f-9ffb-450a-83ad-9c9fe3664a17 - 2020-09-27 03:54:11.995 UTC [10522] LOG:  received fast shutdown request
03:54:12.196 [log:pid(10537)] INFO init-fa930c4f-9ffb-450a-83ad-9c9fe3664a17:pg_ctl - waiting for server to shut down.... done
03:54:12.196 [main] INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - fa930c4f-9ffb-450a-83ad-9c9fe3664a17 shut down postmaster in 00:00:00.202
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.134 s - in org.dataone.bookkeeper.EmbeddedPostgresqlTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 71, 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 774 kB/s)
[INFO] Uploading to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-20200927.035421-18.jar
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-20200927.035421-18.jar (49 MB at 114 MB/s)
[INFO] Uploading to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-20200927.035421-18.pom
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper/0.1.0-SNAPSHOT/bookkeeper-0.1.0-20200927.035421-18.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 319 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)
[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 781 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-20200927.035421-18.jar
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/bookkeeper-client-0.1.0-20200927.035421-18.jar (102 kB at 102 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-20200927.035421-18.pom
[INFO] Uploaded to jenkins.dataone.org: file:///var/www/maven/org/dataone/bookkeeper-client/0.1.0-SNAPSHOT/bookkeeper-client-0.1.0-20200927.035421-18.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 9.9 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)
[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)
Notifying upstream projects of job completion
Join notifier requires a CauseAction
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  32.762 s
[INFO] Finished at: 2020-09-27T03:54:22Z
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data