Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Trino Gateway requires a MySQL or PostgreSQL database.

Use the following scripts to initialize the database:

* [gateway-ha-persistence.sql](../gateway-ha/src/main/resources/gateway-ha-persistence.sql) for MySQL
* [gateway-ha-persistence-mysql.sql](../gateway-ha/src/main/resources/gateway-ha-persistence-mysql.sql) for MySQL
* [gateway-ha-persistence-postgres.sql](../gateway-ha/src/main/resources/gateway-ha-persistence-postgres.sql) for PostgreSQL

The files are also included in the JAR file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import static io.trino.gateway.ha.router.ResourceGroupsManager.ExactSelectorsDetail;

@CompositePK({"environment", "source", "query_type"})
@Table("exact_match_source_selectors") // located in gateway-ha-persistence.sql
@Table("exact_match_source_selectors") // located in gateway-ha-persistence-*.sql
@Cached
public class ExactMatchSourceSelectors
extends Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@BelongsTo(parent = ResourceGroups.class, foreignKeyName = "parent")
@HasMany(child = ResourceGroups.class, foreignKeyName = "parent")
@IdName("resource_group_id")
@Table("resource_groups") // located in gateway-ha-persistence.sql
@Table("resource_groups") // located in gateway-ha-persistence-*.sql
@Cached
public class ResourceGroups
extends Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

@BelongsTo(parent = ResourceGroups.class, foreignKeyName = "resource_group_id")
@IdName("resource_group_id")
@Table("selectors") // located in gateway-ha-persistence.sql
@Table("selectors") // located in gateway-ha-persistence-*.sql
@Cached
public class Selectors
extends Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public static void main(String[] args)
mysql.withUsername("root");
mysql.withPassword("root123");
mysql.withDatabaseName("trinogateway");
mysql.withCopyFileToContainer(forClasspathResource("gateway-ha-persistence.sql"), "/docker-entrypoint-initdb.d/1-gateway-ha-persistence.sql");
mysql.withCopyFileToContainer(forClasspathResource("add_backends.sql"), "/docker-entrypoint-initdb.d/2-add_backends.sql");
mysql.withCopyFileToContainer(forClasspathResource("gateway-ha-persistence-mysql.sql"), "/docker-entrypoint-initdb.d/1-gateway-ha-persistence-mysql.sql");
mysql.withCopyFileToContainer(forClasspathResource("add_backends_mysql.sql"), "/docker-entrypoint-initdb.d/2-add_backends_mysql.sql");
mysql.setPortBindings(List.of("3306:3306"));
mysql.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static void seedRequiredData(TestConfig testConfig)
Jdbi jdbi = Jdbi.create(jdbcUrl, "sa", "sa");
JdbcConnectionManager connectionManager = new JdbcConnectionManager(jdbi, db);
connectionManager.open();
Base.exec(HaGatewayTestUtils.getResourceFileContent("gateway-ha-persistence.sql"));
Base.exec(HaGatewayTestUtils.getResourceFileContent("gateway-ha-persistence-mysql.sql"));
connectionManager.close();
}

Expand Down