Commit c6b28e5b authored by Combava Orange's avatar Combava Orange
Browse files

[clea-batch]: fix flyway/batch initialization state

add latest tables in V3__cluster_periods_stat_location.sql for h2 (local profile)
parent 89bb2b7e
......@@ -4,7 +4,3 @@ spring:
url: jdbc:postgresql://localhost:5432/cleadb
username: username
password: password
batch:
# Manage it's batch metadata tables
initialize-schema: always
......@@ -5,8 +5,3 @@ spring:
username: username
password: password
batch:
# Manage it's batch metadata tables
initialize-schema: always
cluster:
output-path: /tmp/v1
\ No newline at end of file
......@@ -7,5 +7,9 @@ spring:
test-on-borrow: true
validation-query: SELECT 1
batch:
# Manage it's batch metadata tables
initialize-schema: always
flyway:
#enabled: "false"
enabled: "true"
-- NEED TO add the extension as superadmin before using uuid
-- as superadmin user:
-- CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- Needs: Clea-venue-Consumer
ALTER TABLE exposed_visits DROP COLUMN IF EXISTS qr_code_scan_time;
-- Needs: Clea-Batch
CREATE TABLE cluster_periods
(
id VARCHAR(64) NOT NULL DEFAULT random_uuid(),
ltid UUID NOT NULL,
venue_type INT NOT NULL,
venue_category1 INT NOT NULL,
venue_category2 INT NOT NULL,
period_start BIGINT NOT NULL,
first_timeslot INT NOT NULL,
last_timeslot INT NOT NULL,
cluster_start BIGINT NOT NULL,
cluster_duration_in_seconds INT NOT NULL,
risk_level REAL NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX IF NOT EXISTS cluster_periods_ltid ON cluster_periods (ltid);
-- Needs: Clea-Statistiques
CREATE TABLE stat_location
(
period TIMESTAMP(0) WITH TIME ZONE NOT NULL,
venue_type INT NOT NULL,
venue_category1 INT NOT NULL,
venue_category2 INT NOT NULL,
backward_visits BIGINT NOT NULL,
forward_visits BIGINT NOT NULL
);
CREATE INDEX IF NOT EXISTS statloc_period ON stat_location(period);
CREATE INDEX IF NOT EXISTS statloc_venue ON stat_location(venue_type, venue_category1, venue_category2);
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment