Skip to content

Commit 840a1b6

Browse files
committed
GH-403 - Polishing.
Added indexes for HSQLDB (after fix for GH-507). Removed by-listener index for MySQL as it would not be used anyway. Polished index names. Disable Spring Boot banners in tests. Original pull request: GH-411.
1 parent f440af9 commit 840a1b6

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

spring-modulith-events/spring-modulith-events-jdbc/src/main/resources/schema-h2.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ CREATE TABLE IF NOT EXISTS EVENT_PUBLICATION
88
SERIALIZED_EVENT VARCHAR(4000) NOT NULL,
99
PRIMARY KEY (ID)
1010
);
11-
CREATE INDEX IF NOT EXISTS EVENT_PUBLICATION_LISTENER_ID_SERIALIZED_EVENT_IDX ON EVENT_PUBLICATION (LISTENER_ID, SERIALIZED_EVENT);
12-
CREATE INDEX IF NOT EXISTS EVENT_PUBLICATION_COMPLETION_DATE_IDX ON EVENT_PUBLICATION (COMPLETION_DATE);
11+
CREATE INDEX IF NOT EXISTS EVENT_PUBLICATION_BY_LISTENER_ID_AND_SERIALIZED_EVENT_IDX ON EVENT_PUBLICATION (LISTENER_ID, SERIALIZED_EVENT);
12+
CREATE INDEX IF NOT EXISTS EVENT_PUBLICATION_BY_COMPLETION_DATE_IDX ON EVENT_PUBLICATION (COMPLETION_DATE);

spring-modulith-events/spring-modulith-events-jdbc/src/main/resources/schema-hsqldb.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ CREATE TABLE IF NOT EXISTS EVENT_PUBLICATION
77
PUBLICATION_DATE TIMESTAMP(9) NOT NULL,
88
SERIALIZED_EVENT VARCHAR(4000) NOT NULL,
99
PRIMARY KEY (ID)
10-
)
10+
);
11+
CREATE INDEX IF NOT EXISTS EVENT_PUBLICATION_BY_LISTENER_ID_AND_SERIALIZED_EVENT_IDX ON EVENT_PUBLICATION (LISTENER_ID, SERIALIZED_EVENT);
12+
CREATE INDEX IF NOT EXISTS EVENT_PUBLICATION_BY_COMPLETION_DATE_IDX ON EVENT_PUBLICATION (COMPLETION_DATE);

spring-modulith-events/spring-modulith-events-jdbc/src/main/resources/schema-mysql.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ CREATE TABLE IF NOT EXISTS EVENT_PUBLICATION
77
PUBLICATION_DATE TIMESTAMP(6) NOT NULL,
88
COMPLETION_DATE TIMESTAMP(6) DEFAULT NULL NULL,
99
PRIMARY KEY (ID),
10-
INDEX EVENT_PUBLICATION_LISTENER_ID_IDX (LISTENER_ID),
11-
INDEX EVENT_PUBLICATION_COMPLETION_DATE_IDX (COMPLETION_DATE)
10+
INDEX EVENT_PUBLICATION_BY_COMPLETION_DATE_IDX (COMPLETION_DATE)
1211
);

spring-modulith-events/spring-modulith-events-jdbc/src/main/resources/schema-postgresql.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ CREATE TABLE IF NOT EXISTS event_publication
88
completion_date TIMESTAMP WITH TIME ZONE,
99
PRIMARY KEY (id)
1010
);
11-
CREATE INDEX IF NOT EXISTS event_publication_listener_id_serialized_event_idx ON event_publication (listener_id, serialized_event);
12-
CREATE INDEX IF NOT EXISTS event_publication_completion_date_idx ON event_publication (completion_date);
11+
CREATE INDEX IF NOT EXISTS event_publication_by_listener_id_and_serialized_event_idx ON event_publication (listener_id, serialized_event);
12+
CREATE INDEX IF NOT EXISTS event_publication_by_completion_date_idx ON event_publication (completion_date);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
spring.main.banner-mode=OFF

0 commit comments

Comments
 (0)