mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-12 22:41:35 +00:00
#2347 - Rename Database.getPlatform() to platform() with deprecation
This commit is contained in:
1 parent
7fba9adc43
commit
fe67abce83
35 files changed
+76
-53
No files matched your search
@@ -37,7 +37,7 @@ public class ConditionalTestRunner extends BlockJUnit4ClassRunner {
|
||||
|
||||
}
|
||||
private boolean platformMath(Platform[] platforms) {
|
||||
Platform basePlatform = DB.getDefault().getPlatform().base();
|
||||
Platform basePlatform = DB.getDefault().platform().base();
|
||||
for (Platform platform : platforms) {
|
||||
if (platform.equals(basePlatform)) {
|
||||
return true;
|
||||
|
||||
@@ -16,7 +16,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
public class DbMigrationTest extends BaseTestCase {
|
||||
|
||||
private void runScript(boolean expectErrors, String scriptName) throws IOException {
|
||||
String ddl = Helper.asText(this, "/dbmigration/migrationtest/" + server().getPlatform().name().toLowerCase() + "/" + scriptName);
|
||||
String ddl = Helper.asText(this, "/dbmigration/migrationtest/" + server().platform().name().toLowerCase() + "/" + scriptName);
|
||||
runScript(expectErrors, ddl, scriptName);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class PlatformDdl_AlterColumnTest {
|
||||
private final PlatformDdl hanaDdl = PlatformDdlBuilder.create(new HanaPlatform());
|
||||
|
||||
{
|
||||
DatabaseConfig serverConfig = DB.getDefault().getPluginApi().getServerConfig();
|
||||
DatabaseConfig serverConfig = DB.getDefault().pluginApi().getServerConfig();
|
||||
sqlServerDdl.configure(serverConfig);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ public class PlatformDdl_CreateIndexTest {
|
||||
private final PlatformDdl hanaDdl = PlatformDdlBuilder.create(new HanaPlatform());
|
||||
|
||||
{
|
||||
DatabaseConfig config = DB.getDefault().getPluginApi().getServerConfig();
|
||||
DatabaseConfig config = DB.getDefault().pluginApi().getServerConfig();
|
||||
h2Ddl.configure(config);
|
||||
pgDdl.configure(config);
|
||||
mysqlDdl.configure(config);
|
||||
|
||||
Reference in new issue
Block a user