mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-14 06:45:21 +00:00
Yugabyte platform support - Automatic detection and DDL support
- Automatic detection similar to Cockroach - DDL very similar to Postgres but no CREATE TABLE LIKE support (for history DDL)
This commit is contained in:
1 parent
425124d8f7
commit
64605b5090
12 files changed
+98
-33
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package main;
|
||||
|
||||
import io.ebean.docker.commands.YugabyteConfig;
|
||||
import io.ebean.docker.commands.YugabyteContainer;
|
||||
|
||||
public class StartYugabyte {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
YugabyteConfig config = new YugabyteConfig("2.11.2.0-b89");
|
||||
config.setDbName("unit");
|
||||
config.setUser("unit");
|
||||
|
||||
YugabyteContainer container = new YugabyteContainer(config);
|
||||
container.start();
|
||||
|
||||
// Run container ut_yugabyte with host:localhost port:6433 db:unit user:unit/test shutdown:None
|
||||
// docker run -d --name ut_yugabyte -p 6433:5433 -p 7000:7000 -p 9000:9000 -p 9042:9042 yugabytedb/yugabyte:2.11.2.0-b89 bin/yugabyted start --daemon=false
|
||||
// ...
|
||||
// Commands - sqlRun: drop database if exists unit
|
||||
// Commands - sqlRun: drop role if exists unit
|
||||
// Commands - sqlRun: select 1 from pg_database where datname = 'unit'
|
||||
// Commands - sqlRun: select rolname from pg_roles where rolname = 'unit'
|
||||
// Commands - sqlRun: create role unit password 'test' login createrole
|
||||
// Commands - sqlRun: create database unit with owner unit
|
||||
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ ebean.ddl.run=true
|
||||
ebean.ddl.header=-- Generated by ebean ${version} at ${timestamp}
|
||||
ebean.packages=org.tests,org.etest
|
||||
datasource.default=h2
|
||||
#datasource.default=yugabyte
|
||||
#datasource.h2.capturestacktrace=true
|
||||
|
||||
#ebean.dumpMetricsOnShutdown=true
|
||||
@@ -144,6 +145,10 @@ datasource.cockroach.password=
|
||||
datasource.cockroach.url=jdbc:postgresql://localhost:26257/unit?sslmode=disable
|
||||
datasource.cockroach.driver=org.postgresql.Driver
|
||||
|
||||
datasource.yugabyte.username=unit
|
||||
datasource.yugabyte.password=test
|
||||
datasource.yugabyte.url=jdbc:postgresql://localhost:6433/unit?sslmode=disable
|
||||
|
||||
datasource.oracle.username=test_ebean
|
||||
datasource.oracle.password=test
|
||||
datasource.oracle.url=jdbc:oracle:thin:@localhost:1521:XE
|
||||
|
||||
Reference in new issue
Block a user