summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-server/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-server/src/main/resources')
-rw-r--r--opendc-web/opendc-web-server/src/main/resources/application-dev.properties4
-rw-r--r--opendc-web/opendc-web-server/src/main/resources/application-test.properties2
-rw-r--r--opendc-web/opendc-web-server/src/main/resources/db/migration/V1__add_job_report_column.sql2
-rw-r--r--opendc-web/opendc-web-server/src/main/resources/db/migration/V2__add_job_started_at.sql2
-rw-r--r--opendc-web/opendc-web-server/src/main/resources/load_data.sql8
5 files changed, 11 insertions, 7 deletions
diff --git a/opendc-web/opendc-web-server/src/main/resources/application-dev.properties b/opendc-web/opendc-web-server/src/main/resources/application-dev.properties
index 98b1e9eb..6d23040e 100644
--- a/opendc-web/opendc-web-server/src/main/resources/application-dev.properties
+++ b/opendc-web/opendc-web-server/src/main/resources/application-dev.properties
@@ -25,8 +25,8 @@ quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1;INIT=CREATE TY
# Hibernate
quarkus.hibernate-orm.dialect=org.hibernate.dialect.H2Dialect
quarkus.hibernate-orm.log.sql=true
-quarkus.flyway.clean-at-start=true
-quarkus.flyway.locations=db/migration,db/testing
+# Disable Flyway in dev mode - JPA handles schema
+quarkus.flyway.migrate-at-start=false
# Disable authentication
quarkus.oidc.enabled=false
diff --git a/opendc-web/opendc-web-server/src/main/resources/application-test.properties b/opendc-web/opendc-web-server/src/main/resources/application-test.properties
index 4e3063e4..db0775b1 100644
--- a/opendc-web/opendc-web-server/src/main/resources/application-test.properties
+++ b/opendc-web/opendc-web-server/src/main/resources/application-test.properties
@@ -25,7 +25,7 @@ quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1;INIT=CREATE TY
quarkus.hibernate-orm.dialect=org.hibernate.dialect.H2Dialect
quarkus.hibernate-orm.log.sql=true
quarkus.flyway.clean-at-start=true
-quarkus.flyway.locations=db/migration,db/testing
+quarkus.flyway.locations=db/testing
# Disable security
quarkus.oidc.enabled=false
diff --git a/opendc-web/opendc-web-server/src/main/resources/db/migration/V1__add_job_report_column.sql b/opendc-web/opendc-web-server/src/main/resources/db/migration/V1__add_job_report_column.sql
new file mode 100644
index 00000000..108b0c07
--- /dev/null
+++ b/opendc-web/opendc-web-server/src/main/resources/db/migration/V1__add_job_report_column.sql
@@ -0,0 +1,2 @@
+-- Add report column to job table to store simulation warnings and errors
+ALTER TABLE job ADD COLUMN IF NOT EXISTS report jsonb;
diff --git a/opendc-web/opendc-web-server/src/main/resources/db/migration/V2__add_job_started_at.sql b/opendc-web/opendc-web-server/src/main/resources/db/migration/V2__add_job_started_at.sql
new file mode 100644
index 00000000..9df4601a
--- /dev/null
+++ b/opendc-web/opendc-web-server/src/main/resources/db/migration/V2__add_job_started_at.sql
@@ -0,0 +1,2 @@
+-- Add startedAt timestamp to track when job execution begins
+ALTER TABLE job ADD COLUMN IF NOT EXISTS started_at TIMESTAMP;
diff --git a/opendc-web/opendc-web-server/src/main/resources/load_data.sql b/opendc-web/opendc-web-server/src/main/resources/load_data.sql
index df3e3709..090bcd3b 100644
--- a/opendc-web/opendc-web-server/src/main/resources/load_data.sql
+++ b/opendc-web/opendc-web-server/src/main/resources/load_data.sql
@@ -117,8 +117,8 @@ WHERE p.id = 1;
-- Job
-- --------------------------------------------------------------------------------
-INSERT INTO job (scenario_id, created_by, created_at, repeats, updated_at, state, runtime, results, id)
-VALUES (1, 'test_user_1', '2024-03-01T15:31:41.579969Z', 1, '2024-03-01T15:31:41.579969Z', 'PENDING', 1, '{}' FORMAT JSON, 1);
+INSERT INTO job (scenario_id, created_by, created_at, repeats, updated_at, state, runtime, results, report, started_at, id)
+VALUES (1, 'test_user_1', '2024-03-01T15:31:41.579969Z', 1, '2024-03-01T15:31:41.579969Z', 'PENDING', 1, '{}' FORMAT JSON, NULL, NULL, 1);
-INSERT INTO job (scenario_id, created_by, created_at, repeats, updated_at, state, runtime, results, id)
-VALUES (1, 'test_user_1', '2024-03-01T15:31:41.579969Z', 1, '2024-03-01T15:31:41.579969Z', 'PENDING', 1, '{}' FORMAT JSON, 2);
+INSERT INTO job (scenario_id, created_by, created_at, repeats, updated_at, state, runtime, results, report, started_at, id)
+VALUES (1, 'test_user_1', '2024-03-01T15:31:41.579969Z', 1, '2024-03-01T15:31:41.579969Z', 'PENDING', 1, '{}' FORMAT JSON, NULL, NULL, 2);