mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
DDL - Add support for creating schema via database migrations (and create all ddl)
Initially for H2 and Postgres, with commented out DDL for other platforms.
This commit is contained in:
+32
-23
@@ -3,25 +3,12 @@ package io.ebeaninternal.dbmigration.ddlgeneration;
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.BaseTableDdl;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl;
|
||||
import io.ebeaninternal.dbmigration.migration.AddColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.AddHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.AddTableComment;
|
||||
import io.ebeaninternal.dbmigration.migration.AddUniqueConstraint;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterForeignKey;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterTable;
|
||||
import io.ebeaninternal.dbmigration.migration.ChangeSet;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateTable;
|
||||
import io.ebeaninternal.dbmigration.migration.DropColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.DropHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.DropIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.DropTable;
|
||||
import io.ebeaninternal.dbmigration.migration.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Base DDL handler.
|
||||
*/
|
||||
public class BaseDdlHandler implements DdlHandler {
|
||||
|
||||
@@ -37,16 +24,12 @@ public class BaseDdlHandler implements DdlHandler {
|
||||
|
||||
@Override
|
||||
public void generate(DdlWrite writer, ChangeSet changeSet) {
|
||||
|
||||
List<Object> changeSetChildren = changeSet.getChangeSetChildren();
|
||||
createSchemas(writer, changeSetChildren);
|
||||
createTables(writer, changeSetChildren);
|
||||
for (Object change : changeSetChildren) {
|
||||
if (change instanceof CreateTable) {
|
||||
generate(writer, (CreateTable) change);
|
||||
}
|
||||
}
|
||||
for (Object change : changeSetChildren) {
|
||||
if (change instanceof CreateTable) {
|
||||
// ignore
|
||||
if (change instanceof CreateTable || change instanceof CreateSchema) {
|
||||
// ignore, CreateSchema and CreateTable always done first
|
||||
} else if (change instanceof DropTable) {
|
||||
generate(writer, (DropTable) change);
|
||||
} else if (change instanceof AlterTable) {
|
||||
@@ -77,6 +60,27 @@ public class BaseDdlHandler implements DdlHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private void createTables(DdlWrite writer, List<Object> changeSetChildren) {
|
||||
for (Object change : changeSetChildren) {
|
||||
if (change instanceof CreateTable) {
|
||||
generate(writer, (CreateTable) change);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void createSchemas(DdlWrite writer, List<Object> changeSetChildren) {
|
||||
boolean createdSchemas = false;
|
||||
for (Object change : changeSetChildren) {
|
||||
if (change instanceof CreateSchema) {
|
||||
generate(writer, (CreateSchema) change);
|
||||
createdSchemas = true;
|
||||
}
|
||||
}
|
||||
if (createdSchemas) {
|
||||
writer.apply().newLine();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generateProlog(DdlWrite writer) {
|
||||
tableDdl.generateProlog(writer);
|
||||
@@ -87,6 +91,11 @@ public class BaseDdlHandler implements DdlHandler {
|
||||
tableDdl.generateEpilog(writer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(DdlWrite writer, CreateSchema createSchema) {
|
||||
tableDdl.generate(writer, createSchema);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(DdlWrite writer, CreateTable createTable) {
|
||||
tableDdl.generate(writer, createTable);
|
||||
|
||||
+4
-15
@@ -1,19 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.ddlgeneration;
|
||||
|
||||
import io.ebeaninternal.dbmigration.migration.AddColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.AddHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.AddTableComment;
|
||||
import io.ebeaninternal.dbmigration.migration.AddUniqueConstraint;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterForeignKey;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterTable;
|
||||
import io.ebeaninternal.dbmigration.migration.ChangeSet;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateTable;
|
||||
import io.ebeaninternal.dbmigration.migration.DropColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.DropHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.DropIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.DropTable;
|
||||
import io.ebeaninternal.dbmigration.migration.*;
|
||||
|
||||
/**
|
||||
* DDL generation interface.
|
||||
@@ -22,10 +9,12 @@ public interface DdlHandler {
|
||||
|
||||
void generate(DdlWrite writer, ChangeSet changeSet);
|
||||
|
||||
void generate(DdlWrite writer, CreateSchema createSchema);
|
||||
|
||||
void generate(DdlWrite writer, CreateTable createTable);
|
||||
|
||||
void generate(DdlWrite writer, DropTable dropTable);
|
||||
|
||||
|
||||
void generate(DdlWrite writer, AlterTable dropTable);
|
||||
|
||||
void generate(DdlWrite writer, AddTableComment addTableComment);
|
||||
|
||||
+7
-14
@@ -1,24 +1,17 @@
|
||||
package io.ebeaninternal.dbmigration.ddlgeneration;
|
||||
|
||||
import io.ebeaninternal.dbmigration.migration.AddColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.AddHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.AddTableComment;
|
||||
import io.ebeaninternal.dbmigration.migration.AddUniqueConstraint;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterForeignKey;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterTable;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateTable;
|
||||
import io.ebeaninternal.dbmigration.migration.DropColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.DropHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.DropIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.DropTable;
|
||||
import io.ebeaninternal.dbmigration.migration.*;
|
||||
|
||||
/**
|
||||
* Write table DDL.
|
||||
*/
|
||||
public interface TableDdl {
|
||||
|
||||
/**
|
||||
* Generate the create schema change.
|
||||
*/
|
||||
void generate(DdlWrite writer, CreateSchema createSchema);
|
||||
|
||||
/**
|
||||
* Generate the create table change.
|
||||
*/
|
||||
@@ -28,7 +21,7 @@ public interface TableDdl {
|
||||
* Write the drop column change.
|
||||
*/
|
||||
void generate(DdlWrite writer, DropTable dropTable);
|
||||
|
||||
|
||||
/**
|
||||
* Write alter table changes.
|
||||
*/
|
||||
|
||||
+6
-17
@@ -10,23 +10,7 @@ import io.ebeaninternal.dbmigration.ddlgeneration.DdlBuffer;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.DdlOptions;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.DdlWrite;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.TableDdl;
|
||||
import io.ebeaninternal.dbmigration.migration.AddColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.AddHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.AddTableComment;
|
||||
import io.ebeaninternal.dbmigration.migration.AddUniqueConstraint;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterForeignKey;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterTable;
|
||||
import io.ebeaninternal.dbmigration.migration.Column;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateTable;
|
||||
import io.ebeaninternal.dbmigration.migration.DdlScript;
|
||||
import io.ebeaninternal.dbmigration.migration.DropColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.DropHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.DropIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.DropTable;
|
||||
import io.ebeaninternal.dbmigration.migration.ForeignKey;
|
||||
import io.ebeaninternal.dbmigration.migration.UniqueConstraint;
|
||||
import io.ebeaninternal.dbmigration.migration.*;
|
||||
import io.ebeaninternal.dbmigration.model.MTable;
|
||||
import io.ebeaninternal.dbmigration.model.MTableIdentity;
|
||||
import io.ebeaninternal.server.deploy.IdentityMode;
|
||||
@@ -195,6 +179,11 @@ public class BaseTableDdl implements TableDdl {
|
||||
externalCompoundUnique.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(DdlWrite writer, CreateSchema createSchema) {
|
||||
platformDdl.createSchema(writer, createSchema);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the appropriate 'create table' and matching 'drop table' statements
|
||||
* and add them to the appropriate 'apply' and 'rollback' buffers.
|
||||
|
||||
+2
-1
@@ -8,10 +8,11 @@ import io.ebean.config.dbplatform.DatabasePlatform;
|
||||
public class H2Ddl extends PlatformDdl {
|
||||
|
||||
private static boolean useV1Syntax = Boolean.getBoolean("ebean.h2.useV1Syntax");
|
||||
|
||||
|
||||
public H2Ddl(DatabasePlatform platform) {
|
||||
super(platform);
|
||||
this.historyDdl = new H2HistoryDdl();
|
||||
this.createSchemaSupport = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+12
-5
@@ -12,10 +12,7 @@ import io.ebean.util.StringHelper;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.*;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.util.PlatformTypeConverter;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.util.VowelRemover;
|
||||
import io.ebeaninternal.dbmigration.migration.AddHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.Column;
|
||||
import io.ebeaninternal.dbmigration.migration.DropHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.*;
|
||||
import io.ebeaninternal.dbmigration.model.MTable;
|
||||
|
||||
import java.util.List;
|
||||
@@ -101,6 +98,9 @@ public class PlatformDdl {
|
||||
|
||||
protected String updateNullWithDefault = "update ${table} set ${column} = ${default} where ${column} is null";
|
||||
|
||||
protected boolean createSchemaSupport;
|
||||
protected String createSchema = "create schema if not exists";
|
||||
|
||||
protected String createTable = "create table";
|
||||
|
||||
protected String dropColumn = "drop column";
|
||||
@@ -786,7 +786,7 @@ public class PlatformDdl {
|
||||
public void addTablePartition(DdlBuffer apply, String partitionMode, String partitionColumn) {
|
||||
// only supported by postgres initially
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds tablespace declaration. Now only supported for db2.
|
||||
*/
|
||||
@@ -816,4 +816,11 @@ public class PlatformDdl {
|
||||
return checkConstraint;
|
||||
}
|
||||
|
||||
public void createSchema(DdlWrite writer, CreateSchema request) {
|
||||
DdlBuffer apply = writer.apply();
|
||||
if (!createSchemaSupport) {
|
||||
apply.append("-- ");
|
||||
}
|
||||
apply.append(createSchema).append(" ").append(quote(request.getName())).endOfStatement();
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -15,6 +15,7 @@ public class PostgresDdl extends PlatformDdl {
|
||||
public PostgresDdl(DatabasePlatform platform) {
|
||||
super(platform);
|
||||
this.historyDdl = new PostgresHistoryDdl();
|
||||
this.createSchemaSupport = true;
|
||||
this.dropTableCascade = " cascade";
|
||||
this.columnSetType = "type ";
|
||||
this.alterTableIfExists = "if exists ";
|
||||
|
||||
+13
-18
@@ -1,11 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -16,17 +11,17 @@ import java.util.List;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}column" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="withHistory" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}column" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="withHistory" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@@ -49,7 +44,7 @@ public class AddColumn {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the column property.
|
||||
*
|
||||
* <p>
|
||||
|
||||
+8
-12
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,13 +9,13 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="baseTable" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="baseTable" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+9
-13
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,14 +9,14 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="comment" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="comment" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+13
-17
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,18 +9,18 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="constraintName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="columnNames" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="oneToOne" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="nullableColumns" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="platforms" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="constraintName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="columnNames" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="oneToOne" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="nullableColumns" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="platforms" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+37
-41
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,40 +11,40 @@ import java.util.List;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="before" type="{http://ebean-orm.github.io/xml/ns/dbmigration}ddl-script" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="after" type="{http://ebean-orm.github.io/xml/ns/dbmigration}ddl-script" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="columnName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="withHistory" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="currentType" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="defaultValue" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="currentDefaultValue" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="notnull" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="currentNotnull" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="comment" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="historyExclude" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="checkConstraint" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="checkConstraintName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dropCheckConstraint" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="unique" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="uniqueOneToOne" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dropUnique" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="references" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyIndex" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyOnDelete" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyOnUpdate" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dropForeignKey" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dropForeignKeyIndex" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="before" type="{http://ebean-orm.github.io/xml/ns/dbmigration}ddl-script" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="after" type="{http://ebean-orm.github.io/xml/ns/dbmigration}ddl-script" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="columnName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="withHistory" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="currentType" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="defaultValue" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="currentDefaultValue" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="notnull" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="currentNotnull" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="comment" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="historyExclude" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="checkConstraint" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="checkConstraintName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dropCheckConstraint" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="unique" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="uniqueOneToOne" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dropUnique" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="references" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyIndex" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyOnDelete" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyOnUpdate" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dropForeignKey" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dropForeignKeyIndex" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@@ -116,7 +112,7 @@ public class AlterColumn {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the before property.
|
||||
*
|
||||
* <p>
|
||||
@@ -143,7 +139,7 @@ public class AlterColumn {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the after property.
|
||||
*
|
||||
* <p>
|
||||
|
||||
+15
-19
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,20 +9,20 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="columnNames" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="refColumnNames" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="refTableName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="indexName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="onDelete" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="onUpdate" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="columnNames" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="refColumnNames" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="refTableName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="indexName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="onDelete" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="onUpdate" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+8
-12
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,13 +9,13 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="baseTable" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="baseTable" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+390
-473
@@ -1,526 +1,443 @@
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2022.02.01 at 12:03:38 PM CET
|
||||
//
|
||||
|
||||
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.*;
|
||||
import java.math.BigInteger;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attGroup ref="{http://ebean-orm.github.io/xml/ns/dbmigration}tablespaceAttributes"/>
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="newName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="partitionMode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="partitionColumn" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="identityType" type="{http://ebean-orm.github.io/xml/ns/dbmigration}identityType" />
|
||||
* <attribute name="identityStart" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityIncrement" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityCache" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityGenerated" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceInitial" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="sequenceAllocate" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="pkName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="storageEngine" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attGroup ref="{http://ebean-orm.github.io/xml/ns/dbmigration}tablespaceAttributes"/>
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="newName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="partitionMode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="partitionColumn" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="identityType" type="{http://ebean-orm.github.io/xml/ns/dbmigration}identityType" />
|
||||
* <attribute name="identityStart" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityIncrement" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityCache" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityGenerated" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceInitial" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="sequenceAllocate" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="pkName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="storageEngine" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
@XmlRootElement(name = "alterTable")
|
||||
public class AlterTable {
|
||||
|
||||
@XmlAttribute(name = "name", required = true)
|
||||
protected String name;
|
||||
@XmlAttribute(name = "newName")
|
||||
protected String newName;
|
||||
@XmlAttribute(name = "partitionMode")
|
||||
protected String partitionMode;
|
||||
@XmlAttribute(name = "partitionColumn")
|
||||
protected String partitionColumn;
|
||||
@XmlAttribute(name = "identityType")
|
||||
protected IdentityType identityType;
|
||||
@XmlAttribute(name = "identityStart")
|
||||
@XmlSchemaType(name = "positiveInteger")
|
||||
protected BigInteger identityStart;
|
||||
@XmlAttribute(name = "identityIncrement")
|
||||
@XmlSchemaType(name = "positiveInteger")
|
||||
protected BigInteger identityIncrement;
|
||||
@XmlAttribute(name = "identityCache")
|
||||
@XmlSchemaType(name = "positiveInteger")
|
||||
protected BigInteger identityCache;
|
||||
@XmlAttribute(name = "identityGenerated")
|
||||
protected String identityGenerated;
|
||||
@XmlAttribute(name = "sequenceName")
|
||||
protected String sequenceName;
|
||||
@XmlAttribute(name = "sequenceInitial")
|
||||
@XmlSchemaType(name = "positiveInteger")
|
||||
protected BigInteger sequenceInitial;
|
||||
@XmlAttribute(name = "sequenceAllocate")
|
||||
@XmlSchemaType(name = "positiveInteger")
|
||||
protected BigInteger sequenceAllocate;
|
||||
@XmlAttribute(name = "pkName")
|
||||
protected String pkName;
|
||||
@XmlAttribute(name = "storageEngine")
|
||||
protected String storageEngine;
|
||||
@XmlAttribute(name = "tablespace")
|
||||
protected String tablespace;
|
||||
@XmlAttribute(name = "indexTablespace")
|
||||
protected String indexTablespace;
|
||||
@XmlAttribute(name = "lobTablespace")
|
||||
protected String lobTablespace;
|
||||
@XmlAttribute(name = "comment")
|
||||
protected String comment;
|
||||
@XmlAttribute(name = "name", required = true)
|
||||
protected String name;
|
||||
@XmlAttribute(name = "newName")
|
||||
protected String newName;
|
||||
@XmlAttribute(name = "partitionMode")
|
||||
protected String partitionMode;
|
||||
@XmlAttribute(name = "partitionColumn")
|
||||
protected String partitionColumn;
|
||||
@XmlAttribute(name = "identityType")
|
||||
protected IdentityType identityType;
|
||||
@XmlAttribute(name = "identityStart")
|
||||
@XmlSchemaType(name = "positiveInteger")
|
||||
protected BigInteger identityStart;
|
||||
@XmlAttribute(name = "identityIncrement")
|
||||
@XmlSchemaType(name = "positiveInteger")
|
||||
protected BigInteger identityIncrement;
|
||||
@XmlAttribute(name = "identityCache")
|
||||
@XmlSchemaType(name = "positiveInteger")
|
||||
protected BigInteger identityCache;
|
||||
@XmlAttribute(name = "identityGenerated")
|
||||
protected String identityGenerated;
|
||||
@XmlAttribute(name = "sequenceName")
|
||||
protected String sequenceName;
|
||||
@XmlAttribute(name = "sequenceInitial")
|
||||
@XmlSchemaType(name = "positiveInteger")
|
||||
protected BigInteger sequenceInitial;
|
||||
@XmlAttribute(name = "sequenceAllocate")
|
||||
@XmlSchemaType(name = "positiveInteger")
|
||||
protected BigInteger sequenceAllocate;
|
||||
@XmlAttribute(name = "pkName")
|
||||
protected String pkName;
|
||||
@XmlAttribute(name = "storageEngine")
|
||||
protected String storageEngine;
|
||||
@XmlAttribute(name = "tablespace")
|
||||
protected String tablespace;
|
||||
@XmlAttribute(name = "indexTablespace")
|
||||
protected String indexTablespace;
|
||||
@XmlAttribute(name = "lobTablespace")
|
||||
protected String lobTablespace;
|
||||
@XmlAttribute(name = "comment")
|
||||
protected String comment;
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the newName property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getNewName() {
|
||||
return newName;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the newName property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getNewName() {
|
||||
return newName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the newName property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setNewName(String value) {
|
||||
this.newName = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the newName property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setNewName(String value) {
|
||||
this.newName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the partitionMode property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getPartitionMode() {
|
||||
return partitionMode;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the partitionMode property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getPartitionMode() {
|
||||
return partitionMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the partitionMode property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setPartitionMode(String value) {
|
||||
this.partitionMode = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the partitionMode property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setPartitionMode(String value) {
|
||||
this.partitionMode = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the partitionColumn property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getPartitionColumn() {
|
||||
return partitionColumn;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the partitionColumn property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getPartitionColumn() {
|
||||
return partitionColumn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the partitionColumn property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setPartitionColumn(String value) {
|
||||
this.partitionColumn = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the partitionColumn property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setPartitionColumn(String value) {
|
||||
this.partitionColumn = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the identityType property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link IdentityType }
|
||||
*
|
||||
*/
|
||||
public IdentityType getIdentityType() {
|
||||
return identityType;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the identityType property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link IdentityType }
|
||||
*/
|
||||
public IdentityType getIdentityType() {
|
||||
return identityType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the identityType property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link IdentityType }
|
||||
*
|
||||
*/
|
||||
public void setIdentityType(IdentityType value) {
|
||||
this.identityType = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the identityType property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link IdentityType }
|
||||
*/
|
||||
public void setIdentityType(IdentityType value) {
|
||||
this.identityType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the identityStart property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public BigInteger getIdentityStart() {
|
||||
return identityStart;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the identityStart property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigInteger }
|
||||
*/
|
||||
public BigInteger getIdentityStart() {
|
||||
return identityStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the identityStart property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public void setIdentityStart(BigInteger value) {
|
||||
this.identityStart = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the identityStart property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigInteger }
|
||||
*/
|
||||
public void setIdentityStart(BigInteger value) {
|
||||
this.identityStart = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the identityIncrement property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public BigInteger getIdentityIncrement() {
|
||||
return identityIncrement;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the identityIncrement property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigInteger }
|
||||
*/
|
||||
public BigInteger getIdentityIncrement() {
|
||||
return identityIncrement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the identityIncrement property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public void setIdentityIncrement(BigInteger value) {
|
||||
this.identityIncrement = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the identityIncrement property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigInteger }
|
||||
*/
|
||||
public void setIdentityIncrement(BigInteger value) {
|
||||
this.identityIncrement = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the identityCache property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public BigInteger getIdentityCache() {
|
||||
return identityCache;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the identityCache property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigInteger }
|
||||
*/
|
||||
public BigInteger getIdentityCache() {
|
||||
return identityCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the identityCache property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public void setIdentityCache(BigInteger value) {
|
||||
this.identityCache = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the identityCache property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigInteger }
|
||||
*/
|
||||
public void setIdentityCache(BigInteger value) {
|
||||
this.identityCache = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the identityGenerated property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getIdentityGenerated() {
|
||||
return identityGenerated;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the identityGenerated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getIdentityGenerated() {
|
||||
return identityGenerated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the identityGenerated property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setIdentityGenerated(String value) {
|
||||
this.identityGenerated = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the identityGenerated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setIdentityGenerated(String value) {
|
||||
this.identityGenerated = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the sequenceName property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getSequenceName() {
|
||||
return sequenceName;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the sequenceName property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getSequenceName() {
|
||||
return sequenceName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the sequenceName property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setSequenceName(String value) {
|
||||
this.sequenceName = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the sequenceName property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setSequenceName(String value) {
|
||||
this.sequenceName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the sequenceInitial property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public BigInteger getSequenceInitial() {
|
||||
return sequenceInitial;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the sequenceInitial property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigInteger }
|
||||
*/
|
||||
public BigInteger getSequenceInitial() {
|
||||
return sequenceInitial;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the sequenceInitial property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public void setSequenceInitial(BigInteger value) {
|
||||
this.sequenceInitial = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the sequenceInitial property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigInteger }
|
||||
*/
|
||||
public void setSequenceInitial(BigInteger value) {
|
||||
this.sequenceInitial = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the sequenceAllocate property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public BigInteger getSequenceAllocate() {
|
||||
return sequenceAllocate;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the sequenceAllocate property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigInteger }
|
||||
*/
|
||||
public BigInteger getSequenceAllocate() {
|
||||
return sequenceAllocate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the sequenceAllocate property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public void setSequenceAllocate(BigInteger value) {
|
||||
this.sequenceAllocate = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the sequenceAllocate property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigInteger }
|
||||
*/
|
||||
public void setSequenceAllocate(BigInteger value) {
|
||||
this.sequenceAllocate = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the pkName property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getPkName() {
|
||||
return pkName;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the pkName property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getPkName() {
|
||||
return pkName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the pkName property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setPkName(String value) {
|
||||
this.pkName = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the pkName property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setPkName(String value) {
|
||||
this.pkName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the storageEngine property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getStorageEngine() {
|
||||
return storageEngine;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the storageEngine property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getStorageEngine() {
|
||||
return storageEngine;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the storageEngine property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setStorageEngine(String value) {
|
||||
this.storageEngine = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the storageEngine property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setStorageEngine(String value) {
|
||||
this.storageEngine = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the tablespace property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getTablespace() {
|
||||
return tablespace;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the tablespace property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getTablespace() {
|
||||
return tablespace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the tablespace property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setTablespace(String value) {
|
||||
this.tablespace = value;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the tablespace property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setTablespace(String value) {
|
||||
this.tablespace = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the indexTablespace property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getIndexTablespace() {
|
||||
return indexTablespace;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the indexTablespace property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getIndexTablespace() {
|
||||
return indexTablespace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the indexTablespace property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setIndexTablespace(String value) {
|
||||
this.indexTablespace = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the lobTablespace property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getLobTablespace() {
|
||||
return lobTablespace;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the indexTablespace property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setIndexTablespace(String value) {
|
||||
this.indexTablespace = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the lobTablespace property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setLobTablespace(String value) {
|
||||
this.lobTablespace = value;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the lobTablespace property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getLobTablespace() {
|
||||
return lobTablespace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the comment property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
/**
|
||||
* Sets the value of the lobTablespace property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setLobTablespace(String value) {
|
||||
this.lobTablespace = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the comment property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setComment(String value) {
|
||||
this.comment = value;
|
||||
}
|
||||
/**
|
||||
* Gets the value of the comment property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the comment property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setComment(String value) {
|
||||
this.comment = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-5
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+7
-11
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,12 +9,12 @@ import javax.xml.bind.annotation.XmlValue;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <simpleContent>
|
||||
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <simpleContent>
|
||||
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+33
-36
@@ -1,12 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElements;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,23 +11,23 @@ import java.util.List;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <choice>
|
||||
* <group ref="{http://ebean-orm.github.io/xml/ns/dbmigration}changeSetChildren" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </choice>
|
||||
* </sequence>
|
||||
* <attribute name="type" use="required" type="{http://ebean-orm.github.io/xml/ns/dbmigration}changeSetType" />
|
||||
* <attribute name="dropsFor" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="suppressDropsForever" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="generated" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="author" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="comment" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <choice>
|
||||
* <group ref="{http://ebean-orm.github.io/xml/ns/dbmigration}changeSetChildren" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </choice>
|
||||
* </sequence>
|
||||
* <attribute name="type" use="required" type="{http://ebean-orm.github.io/xml/ns/dbmigration}changeSetType" />
|
||||
* <attribute name="dropsFor" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="suppressDropsForever" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="generated" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="author" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="comment" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@@ -46,6 +40,7 @@ public class ChangeSet {
|
||||
@XmlElements({
|
||||
@XmlElement(name = "configuration", type = Configuration.class),
|
||||
@XmlElement(name = "sql", type = Sql.class),
|
||||
@XmlElement(name = "createSchema", type = CreateSchema.class),
|
||||
@XmlElement(name = "createTable", type = CreateTable.class),
|
||||
@XmlElement(name = "alterTable", type = AlterTable.class),
|
||||
@XmlElement(name = "dropTable", type = DropTable.class),
|
||||
@@ -82,7 +77,7 @@ public class ChangeSet {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the changeSetChildren property.
|
||||
*
|
||||
* <p>
|
||||
@@ -94,22 +89,24 @@ public class ChangeSet {
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link Configuration }
|
||||
* {@link Sql }
|
||||
* {@link CreateTable }
|
||||
* {@link DropTable }
|
||||
* {@link RenameTable }
|
||||
* {@link AddColumn }
|
||||
* {@link AddHistoryTable }
|
||||
* {@link AddTableComment }
|
||||
* {@link AddUniqueConstraint }
|
||||
* {@link AddHistoryTable }
|
||||
* {@link DropHistoryTable }
|
||||
* {@link AlterForeignKey }
|
||||
* {@link AddColumn }
|
||||
* {@link DropColumn }
|
||||
* {@link AlterColumn }
|
||||
* {@link RenameColumn }
|
||||
* {@link AlterForeignKey }
|
||||
* {@link AlterTable }
|
||||
* {@link Configuration }
|
||||
* {@link CreateIndex }
|
||||
* {@link CreateSchema }
|
||||
* {@link CreateTable }
|
||||
* {@link DropColumn }
|
||||
* {@link DropHistoryTable }
|
||||
* {@link DropIndex }
|
||||
* {@link DropTable }
|
||||
* {@link RenameColumn }
|
||||
* {@link RenameTable }
|
||||
* {@link Sql }
|
||||
*/
|
||||
public List<Object> getChangeSetChildren() {
|
||||
if (changeSetChildren == null) {
|
||||
|
||||
+8
-9
@@ -9,16 +9,15 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>Java class for changeSetType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p>
|
||||
* <pre>
|
||||
* <simpleType name="changeSetType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
|
||||
* <enumeration value="apply"/>
|
||||
* <enumeration value="pendingDrops"/>
|
||||
* <enumeration value="baseline"/>
|
||||
* <enumeration value="drop"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* <simpleType name="changeSetType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
|
||||
* <enumeration value="apply"/>
|
||||
* <enumeration value="pendingDrops"/>
|
||||
* <enumeration value="baseline"/>
|
||||
* <enumeration value="drop"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlType(name = "changeSetType")
|
||||
|
||||
+30
-34
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,33 +11,33 @@ import java.util.List;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="before" type="{http://ebean-orm.github.io/xml/ns/dbmigration}ddl-script" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="after" type="{http://ebean-orm.github.io/xml/ns/dbmigration}ddl-script" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="defaultValue" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="notnull" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="historyExclude" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="primaryKey" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="identity" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="checkConstraint" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="checkConstraintName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="unique" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="uniqueOneToOne" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="references" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyIndex" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyOnDelete" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyOnUpdate" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="comment" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="before" type="{http://ebean-orm.github.io/xml/ns/dbmigration}ddl-script" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="after" type="{http://ebean-orm.github.io/xml/ns/dbmigration}ddl-script" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="defaultValue" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="notnull" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="historyExclude" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="primaryKey" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="identity" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="checkConstraint" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="checkConstraintName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="unique" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="uniqueOneToOne" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="references" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyIndex" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyOnDelete" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="foreignKeyOnUpdate" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="comment" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@@ -95,7 +91,7 @@ public class Column {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the before property.
|
||||
*
|
||||
* <p>
|
||||
@@ -122,7 +118,7 @@ public class Column {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the after property.
|
||||
*
|
||||
* <p>
|
||||
|
||||
+10
-14
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,15 +9,15 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}defaultTablespace"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}defaultTablespace"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+14
-18
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,19 +9,19 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="indexName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="columns" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="unique" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="concurrent" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="definition" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="platforms" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="indexName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="columns" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="unique" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="concurrent" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="definition" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="platforms" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
@XmlRootElement(name = "createSchema")
|
||||
public class CreateSchema {
|
||||
|
||||
@XmlAttribute(name = "name")
|
||||
protected String name;
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*/
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
||||
}
|
||||
+32
-38
@@ -1,12 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -18,33 +12,33 @@ import java.util.List;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}column" maxOccurs="unbounded"/>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}uniqueConstraint" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}foreignKey" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attGroup ref="{http://ebean-orm.github.io/xml/ns/dbmigration}tablespaceAttributes"/>
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="partitionMode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="partitionColumn" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="withHistory" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="draft" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="identityType" type="{http://ebean-orm.github.io/xml/ns/dbmigration}identityType" />
|
||||
* <attribute name="identityStart" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityIncrement" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityCache" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityGenerated" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceInitial" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="sequenceAllocate" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="pkName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="storageEngine" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}column" maxOccurs="unbounded"/>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}uniqueConstraint" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}foreignKey" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attGroup ref="{http://ebean-orm.github.io/xml/ns/dbmigration}tablespaceAttributes"/>
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="partitionMode" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="partitionColumn" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="withHistory" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="draft" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="identityType" type="{http://ebean-orm.github.io/xml/ns/dbmigration}identityType" />
|
||||
* <attribute name="identityStart" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityIncrement" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityCache" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="identityGenerated" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceInitial" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="sequenceAllocate" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
|
||||
* <attribute name="pkName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="storageEngine" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@@ -110,7 +104,7 @@ public class CreateTable {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the column property.
|
||||
*
|
||||
* <p>
|
||||
@@ -137,7 +131,7 @@ public class CreateTable {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the uniqueConstraint property.
|
||||
*
|
||||
* <p>
|
||||
@@ -164,7 +158,7 @@ public class CreateTable {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the foreignKey property.
|
||||
*
|
||||
* <p>
|
||||
@@ -524,7 +518,7 @@ public class CreateTable {
|
||||
public void setIndexTablespace(String value) {
|
||||
this.indexTablespace = value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value of the lobTablespace property.
|
||||
*
|
||||
|
||||
+12
-16
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,16 +11,16 @@ import java.util.List;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="ddl-script">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="ddl" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* <attribute name="platforms" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="ddl-script">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="ddl" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* <attribute name="platforms" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@@ -44,7 +40,7 @@ public class DdlScript {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the ddl property.
|
||||
*
|
||||
* <p>
|
||||
|
||||
+10
-14
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,15 +9,15 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="tables" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="indexes" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="history" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="tables" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="indexes" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="history" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+10
-14
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,15 +9,15 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="columnName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="withHistory" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="columnName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="withHistory" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+8
-12
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,13 +9,13 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="baseTable" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="baseTable" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+11
-15
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,16 +9,16 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="indexName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="concurrent" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="platforms" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="indexName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="concurrent" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="platforms" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+10
-14
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,15 +9,15 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceCol" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceCol" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="sequenceName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+14
-18
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,19 +9,19 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="columnNames" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="refColumnNames" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="refTableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="indexName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="onDelete" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="onUpdate" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="columnNames" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="refColumnNames" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="refTableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="indexName" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="onDelete" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="onUpdate" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+9
-10
@@ -9,17 +9,16 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>Java class for identityType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p>
|
||||
* <pre>
|
||||
* <simpleType name="identityType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
|
||||
* <enumeration value="identity"/>
|
||||
* <enumeration value="sequence"/>
|
||||
* <enumeration value="generator"/>
|
||||
* <enumeration value="external"/>
|
||||
* <enumeration value="default"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* <simpleType name="identityType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
|
||||
* <enumeration value="identity"/>
|
||||
* <enumeration value="sequence"/>
|
||||
* <enumeration value="generator"/>
|
||||
* <enumeration value="external"/>
|
||||
* <enumeration value="default"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlType(name = "identityType")
|
||||
|
||||
+11
-15
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,15 +11,15 @@ import java.util.List;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}changeSet" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}changeSet" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@@ -42,7 +38,7 @@ public class Migration {
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* returned list will be present inside the Jakarta XML Binding object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the changeSet property.
|
||||
*
|
||||
* <p>
|
||||
|
||||
+92
-85
@@ -27,10 +27,59 @@ public class ObjectFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AddUniqueConstraint }
|
||||
* Create an instance of {@link Migration }
|
||||
*/
|
||||
public AddUniqueConstraint createAddUniqueConstraint() {
|
||||
return new AddUniqueConstraint();
|
||||
public Migration createMigration() {
|
||||
return new Migration();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link ChangeSet }
|
||||
*/
|
||||
public ChangeSet createChangeSet() {
|
||||
return new ChangeSet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Configuration }
|
||||
*/
|
||||
public Configuration createConfiguration() {
|
||||
return new Configuration();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link DefaultTablespace }
|
||||
*/
|
||||
public DefaultTablespace createDefaultTablespace() {
|
||||
return new DefaultTablespace();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Sql }
|
||||
*/
|
||||
public Sql createSql() {
|
||||
return new Sql();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Apply }
|
||||
*/
|
||||
public Apply createApply() {
|
||||
return new Apply();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Rollback }
|
||||
*/
|
||||
public Rollback createRollback() {
|
||||
return new Rollback();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CreateSchema }
|
||||
*/
|
||||
public CreateSchema createCreateSchema() {
|
||||
return new CreateSchema();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,17 +118,17 @@ public class ObjectFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Configuration }
|
||||
* Create an instance of {@link AlterTable }
|
||||
*/
|
||||
public Configuration createConfiguration() {
|
||||
return new Configuration();
|
||||
public AlterTable createAlterTable() {
|
||||
return new AlterTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link DefaultTablespace }
|
||||
* Create an instance of {@link DropTable }
|
||||
*/
|
||||
public DefaultTablespace createDefaultTablespace() {
|
||||
return new DefaultTablespace();
|
||||
public DropTable createDropTable() {
|
||||
return new DropTable();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,6 +138,27 @@ public class ObjectFactory {
|
||||
return new RenameTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AddTableComment }
|
||||
*/
|
||||
public AddTableComment createAddTableComment() {
|
||||
return new AddTableComment();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AddUniqueConstraint }
|
||||
*/
|
||||
public AddUniqueConstraint createAddUniqueConstraint() {
|
||||
return new AddUniqueConstraint();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AddHistoryTable }
|
||||
*/
|
||||
public AddHistoryTable createAddHistoryTable() {
|
||||
return new AddHistoryTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link DropHistoryTable }
|
||||
*/
|
||||
@@ -103,55 +173,6 @@ public class ObjectFactory {
|
||||
return new AlterForeignKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link DropColumn }
|
||||
*/
|
||||
public DropColumn createDropColumn() {
|
||||
return new DropColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Sql }
|
||||
*/
|
||||
public Sql createSql() {
|
||||
return new Sql();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Apply }
|
||||
*/
|
||||
public Apply createApply() {
|
||||
return new Apply();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Rollback }
|
||||
*/
|
||||
public Rollback createRollback() {
|
||||
return new Rollback();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link DropIndex }
|
||||
*/
|
||||
public DropIndex createDropIndex() {
|
||||
return new DropIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link RenameColumn }
|
||||
*/
|
||||
public RenameColumn createRenameColumn() {
|
||||
return new RenameColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link DropTable }
|
||||
*/
|
||||
public DropTable createDropTable() {
|
||||
return new DropTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AddColumn }
|
||||
*/
|
||||
@@ -160,10 +181,10 @@ public class ObjectFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AddTableComment }
|
||||
* Create an instance of {@link DropColumn }
|
||||
*/
|
||||
public AddTableComment createAddTableComment() {
|
||||
return new AddTableComment();
|
||||
public DropColumn createDropColumn() {
|
||||
return new DropColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -173,6 +194,13 @@ public class ObjectFactory {
|
||||
return new AlterColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link RenameColumn }
|
||||
*/
|
||||
public RenameColumn createRenameColumn() {
|
||||
return new RenameColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CreateIndex }
|
||||
*/
|
||||
@@ -181,24 +209,10 @@ public class ObjectFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link ChangeSet }
|
||||
* Create an instance of {@link DropIndex }
|
||||
*/
|
||||
public ChangeSet createChangeSet() {
|
||||
return new ChangeSet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AlterTable }
|
||||
*/
|
||||
public AlterTable createAlterTable() {
|
||||
return new AlterTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AddHistoryTable }
|
||||
*/
|
||||
public AddHistoryTable createAddHistoryTable() {
|
||||
return new AddHistoryTable();
|
||||
public DropIndex createDropIndex() {
|
||||
return new DropIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -208,11 +222,4 @@ public class ObjectFactory {
|
||||
return new AlterHistoryTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Migration }
|
||||
*/
|
||||
public Migration createMigration() {
|
||||
return new Migration();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+11
-15
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,16 +9,16 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="oldName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="newName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dataType" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="oldName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="newName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="tableName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="dataType" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+9
-13
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,14 +9,14 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="oldName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="newName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="oldName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="newName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+7
-11
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,12 +9,12 @@ import javax.xml.bind.annotation.XmlValue;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <simpleContent>
|
||||
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <simpleContent>
|
||||
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,16 +9,16 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}apply"/>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}rollback"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}apply"/>
|
||||
* <element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}rollback"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+12
-16
@@ -1,10 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,17 +9,17 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="columnNames" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="oneToOne" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="nullableColumns" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="platforms" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="columnNames" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="oneToOne" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="nullableColumns" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="platforms" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
|
||||
+16
-16
@@ -1,23 +1,11 @@
|
||||
package io.ebeaninternal.dbmigration.model;
|
||||
|
||||
import io.ebeaninternal.dbmigration.migration.AddColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.AddHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.AddTableComment;
|
||||
import io.ebeaninternal.dbmigration.migration.AddUniqueConstraint;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterForeignKey;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterTable;
|
||||
import io.ebeaninternal.dbmigration.migration.ChangeSet;
|
||||
import io.ebeaninternal.dbmigration.migration.ChangeSetType;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.DropColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.DropHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.DropIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.Migration;
|
||||
import io.ebeaninternal.dbmigration.migration.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Used to prepare a diff in terms of changes required to migrate from
|
||||
@@ -117,9 +105,15 @@ public class ModelDiff {
|
||||
* Compare to a 'newer' model and collect the differences.
|
||||
*/
|
||||
public void compareTo(ModelContainer newModel) {
|
||||
Set<String> baseSchemas = baseModel.getSchemas();
|
||||
for (String schema : newModel.getSchemas()) {
|
||||
if (!baseSchemas.contains(schema)) {
|
||||
addCreateSchema(schema);
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, MTable> newTables = newModel.getTables();
|
||||
for (MTable newTable : newTables.values()) {
|
||||
|
||||
MTable currentTable = baseModel.getTable(newTable.getName());
|
||||
if (currentTable == null) {
|
||||
addNewTable(newTable);
|
||||
@@ -159,6 +153,12 @@ public class ModelDiff {
|
||||
}
|
||||
}
|
||||
|
||||
protected void addCreateSchema(String schema) {
|
||||
CreateSchema createSchema = new CreateSchema();
|
||||
createSchema.setName(schema);
|
||||
applyChanges.add(createSchema);
|
||||
}
|
||||
|
||||
protected void addDropTable(MTable existingTable) {
|
||||
dropChanges.add(existingTable.dropTable());
|
||||
}
|
||||
@@ -253,7 +253,7 @@ public class ModelDiff {
|
||||
public void addAlterForeignKey(AlterForeignKey alterForeignKey) {
|
||||
applyChanges.add(alterForeignKey);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a table alter.
|
||||
*/
|
||||
|
||||
@@ -97,6 +97,12 @@
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="createSchema">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="name" type="xsd:string"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<!-- TABLE -->
|
||||
|
||||
<xsd:element name="createTable">
|
||||
@@ -218,7 +224,7 @@
|
||||
<xsd:attribute name="baseTable" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:element name="alterTable">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
@@ -238,7 +244,7 @@
|
||||
<xsd:attributeGroup ref="tablespaceAttributes"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
|
||||
<xsd:element name="dropHistoryTable">
|
||||
<xsd:complexType>
|
||||
@@ -372,6 +378,7 @@
|
||||
<xsd:element ref="configuration" maxOccurs="1"/>
|
||||
<xsd:element ref="sql" maxOccurs="unbounded"/>
|
||||
|
||||
<xsd:element ref="createSchema" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="createTable" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="alterTable" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="dropTable" maxOccurs="unbounded"/>
|
||||
@@ -390,7 +397,6 @@
|
||||
|
||||
<xsd:element ref="createIndex" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="dropIndex" maxOccurs="unbounded"/>
|
||||
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
|
||||
|
||||
+51
-20
@@ -5,13 +5,11 @@ import io.ebean.platform.clickhouse.ClickHousePlatform;
|
||||
import io.ebean.platform.h2.H2Platform;
|
||||
import io.ebean.platform.mysql.MySqlPlatform;
|
||||
import io.ebean.platform.oracle.OraclePlatform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.BaseDdlHandler;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.DdlWrite;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.Helper;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
import io.ebeaninternal.dbmigration.migration.AddTableComment;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterColumn;
|
||||
import io.ebeaninternal.dbmigration.migration.Column;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateTable;
|
||||
import io.ebeaninternal.dbmigration.migration.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
@@ -19,14 +17,53 @@ import java.util.List;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
|
||||
public class BaseTableDdlTest {
|
||||
class BaseTableDdlTest {
|
||||
|
||||
private final DatabaseConfig serverConfig = new DatabaseConfig();
|
||||
private final PlatformDdl h2ddl = PlatformDdlBuilder.create(new H2Platform());
|
||||
|
||||
@Test
|
||||
public void testAlterColumn() {
|
||||
void createSchema_h2() {
|
||||
BaseTableDdl ddlGen = new BaseTableDdl(serverConfig, h2ddl);
|
||||
|
||||
CreateSchema createSchema = new CreateSchema();
|
||||
createSchema.setName("foo");
|
||||
|
||||
DdlWrite writer = new DdlWrite();
|
||||
ddlGen.generate(writer, createSchema);
|
||||
|
||||
String ddl = writer.toString();
|
||||
assertThat(ddl).contains("-- apply changes\n");
|
||||
assertThat(ddl).contains("create schema if not exists foo;");
|
||||
}
|
||||
|
||||
@Test
|
||||
void createSchema_oracle() {
|
||||
final PlatformDdl oraDDL = PlatformDdlBuilder.create(new OraclePlatform());
|
||||
BaseTableDdl ddlGen = new BaseTableDdl(serverConfig, oraDDL);
|
||||
|
||||
CreateSchema createSchema = new CreateSchema();
|
||||
createSchema.setName("foo");
|
||||
|
||||
DdlWrite writer = new DdlWrite();
|
||||
ddlGen.generate(writer, createSchema);
|
||||
assertThat(writer.toString())
|
||||
.contains("-- apply changes\n")
|
||||
.contains("-- create schema if not exists foo;");
|
||||
|
||||
ChangeSet changeSet = new ChangeSet();
|
||||
changeSet.getChangeSetChildren().add(createSchema);
|
||||
|
||||
BaseDdlHandler ddlHandler = new BaseDdlHandler(new DatabaseConfig(), oraDDL);
|
||||
DdlWrite writer2 = new DdlWrite();
|
||||
ddlHandler.generate(writer2, changeSet);
|
||||
assertThat(writer.toString())
|
||||
.contains("-- apply changes\n")
|
||||
.contains("-- create schema if not exists foo;");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testAlterColumn() {
|
||||
BaseTableDdl ddlGen = new BaseTableDdl(serverConfig, h2ddl);
|
||||
|
||||
DdlWrite writer = new DdlWrite();
|
||||
@@ -44,8 +81,7 @@ public class BaseTableDdlTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddColumn_withTypeConversion() {
|
||||
|
||||
void testAddColumn_withTypeConversion() {
|
||||
BaseTableDdl ddlGen = new BaseTableDdl(serverConfig, PlatformDdlBuilder.create(new OraclePlatform()));
|
||||
|
||||
DdlWrite writer = new DdlWrite();
|
||||
@@ -61,8 +97,7 @@ public class BaseTableDdlTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddColumn_withTypeConversion_clickHouseVarchar() {
|
||||
|
||||
void testAddColumn_withTypeConversion_clickHouseVarchar() {
|
||||
ClickHouseTableDdl ddlGen = new ClickHouseTableDdl(serverConfig, PlatformDdlBuilder.create(new ClickHousePlatform()));
|
||||
|
||||
DdlWrite writer = new DdlWrite();
|
||||
@@ -78,8 +113,7 @@ public class BaseTableDdlTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAlterColumnComment() {
|
||||
|
||||
void testAlterColumnComment() {
|
||||
BaseTableDdl ddlGen = new BaseTableDdl(serverConfig, h2ddl);
|
||||
|
||||
DdlWrite writer = new DdlWrite();
|
||||
@@ -96,7 +130,7 @@ public class BaseTableDdlTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void alterTableAddColumnWithComment() {
|
||||
void alterTableAddColumnWithComment() {
|
||||
BaseTableDdl ddl = new BaseTableDdl(serverConfig, h2ddl);
|
||||
DdlWrite writer = new DdlWrite();
|
||||
Column column = new Column();
|
||||
@@ -111,8 +145,7 @@ public class BaseTableDdlTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddTableComment() {
|
||||
|
||||
void testAddTableComment() {
|
||||
BaseTableDdl ddlGen = new BaseTableDdl(serverConfig, h2ddl);
|
||||
|
||||
DdlWrite writer = new DdlWrite();
|
||||
@@ -128,8 +161,7 @@ public class BaseTableDdlTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddTableComment_mysql() {
|
||||
|
||||
void testAddTableComment_mysql() {
|
||||
BaseTableDdl ddlGen = new BaseTableDdl(serverConfig, PlatformDdlBuilder.create(new MySqlPlatform()));
|
||||
|
||||
DdlWrite writer = new DdlWrite();
|
||||
@@ -145,8 +177,7 @@ public class BaseTableDdlTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGenerate() throws Exception {
|
||||
|
||||
void testGenerate() throws Exception {
|
||||
BaseTableDdl ddlGen = new BaseTableDdl(serverConfig, h2ddl);
|
||||
|
||||
DdlWrite writer = new DdlWrite();
|
||||
|
||||
+14
-27
@@ -2,10 +2,7 @@ package io.ebeaninternal.dbmigration.model;
|
||||
|
||||
|
||||
import io.ebean.migration.MigrationVersion;
|
||||
import io.ebeaninternal.dbmigration.migration.DropHistoryTable;
|
||||
import io.ebeaninternal.dbmigration.migration.DropIndex;
|
||||
import io.ebeaninternal.dbmigration.migration.DropTable;
|
||||
import io.ebeaninternal.dbmigration.migration.Migration;
|
||||
import io.ebeaninternal.dbmigration.migration.*;
|
||||
import io.ebeaninternal.dbmigration.migrationreader.MigrationXmlReader;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -14,11 +11,10 @@ import java.util.Set;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class ModelContainerTest {
|
||||
class ModelContainerTest {
|
||||
|
||||
@Test
|
||||
public void elementCollectionTable_single_expect_foreignKeys() {
|
||||
|
||||
void elementCollectionTable_single_expect_foreignKeys() {
|
||||
ModelContainer container = new ModelContainer();
|
||||
|
||||
container.addTableElementCollection(createElementCollectionTable("ec_bean.id", "fk_ec_bean_ec_table"));
|
||||
@@ -29,8 +25,7 @@ public class ModelContainerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void elementCollectionTable_reused_expect_noForeignKeys() {
|
||||
|
||||
void elementCollectionTable_reused_expect_noForeignKeys() {
|
||||
ModelContainer container = new ModelContainer();
|
||||
|
||||
container.addTableElementCollection(createElementCollectionTable("ec_bean.id", "fk_ec_bean_ec_table"));
|
||||
@@ -47,7 +42,6 @@ public class ModelContainerTest {
|
||||
}
|
||||
|
||||
private MTable createElementCollectionTable(String references, String fkName) {
|
||||
|
||||
MTable ecTable = new MTable("ec_table");
|
||||
final MColumn colFk = new MColumn("fk_col", "varchar", true);
|
||||
colFk.setReferences(references);
|
||||
@@ -62,8 +56,7 @@ public class ModelContainerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void apply_when_noPendingDrops_then_emptyPending() {
|
||||
|
||||
void apply_when_noPendingDrops_then_emptyPending() {
|
||||
ModelContainer container = new ModelContainer();
|
||||
container.apply(mig("1.0.model.xml"), ver("1.1"));
|
||||
assertThat(container.getPendingDrops()).isEmpty();
|
||||
@@ -71,8 +64,7 @@ public class ModelContainerTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void apply_when_pendingDrops_then_registeredHistoryTable() {
|
||||
|
||||
void apply_when_pendingDrops_then_registeredHistoryTable() {
|
||||
ModelContainer base = container_1_1();
|
||||
|
||||
MTable table = base.getTable("document");
|
||||
@@ -85,8 +77,7 @@ public class ModelContainerTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void apply_when_pendingDropsApplied_then_droppedTableNotInHistory() {
|
||||
|
||||
void apply_when_pendingDropsApplied_then_droppedTableNotInHistory() {
|
||||
ModelContainer container = container_1_1();
|
||||
container.apply(mig("1.1_2__drops.model.xml"), ver("1.1_2"));
|
||||
|
||||
@@ -99,8 +90,7 @@ public class ModelContainerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void apply_when_apply_partial_pendingDrops_then_some_remainder() {
|
||||
|
||||
void apply_when_apply_partial_pendingDrops_then_some_remainder() {
|
||||
ModelContainer container = container_2_1();
|
||||
container.apply(mig("2.2__drops.model.xml"), ver("2.2"));
|
||||
|
||||
@@ -116,30 +106,28 @@ public class ModelContainerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void apply_sql() {
|
||||
void apply_sql() {
|
||||
ModelContainer container = new ModelContainer();
|
||||
container.apply(mig("3.0__rawSql.model.xml"), ver("3.0"));
|
||||
assertThat(container.getPendingDrops()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void apply_alterForeignKey() {
|
||||
void apply_alterForeignKey() {
|
||||
ModelContainer container = new ModelContainer();
|
||||
container.apply(mig("4.0__alterForeignKey.model.xml"), ver("4.0"));
|
||||
assertThat(container.getPendingDrops()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void apply_dropTable_when_notInModel_then_ok() {
|
||||
|
||||
void apply_dropTable_when_notInModel_then_ok() {
|
||||
ModelContainer container = new ModelContainer();
|
||||
container.apply(mig("5.0__dropTable.model.xml"), ver("5.0"));
|
||||
assertThat(container.getTables()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void apply_drop_when_notInModel_then_ok() {
|
||||
|
||||
void apply_drop_when_notInModel_then_ok() {
|
||||
ModelContainer container = new ModelContainer();
|
||||
DropTable dropTable = new DropTable();
|
||||
dropTable.setName("DoesNotExist");
|
||||
@@ -155,7 +143,7 @@ public class ModelContainerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void apply_renameColumn() {
|
||||
void apply_renameColumn() {
|
||||
ModelContainer container = new ModelContainer();
|
||||
container.apply(mig("6.0__renameColumn.model.xml"), ver("6.0"));
|
||||
|
||||
@@ -165,8 +153,7 @@ public class ModelContainerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getSchemas() {
|
||||
|
||||
void getSchemas() {
|
||||
MTable t0 = new MTable("foo.one");
|
||||
MTable t1 = new MTable("foo.two");
|
||||
MTable t2 = new MTable("bar.three");
|
||||
|
||||
+30
-4
@@ -1,15 +1,18 @@
|
||||
package io.ebeaninternal.dbmigration.model;
|
||||
|
||||
import io.ebeaninternal.dbmigration.migration.ChangeSet;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateSchema;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateTable;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
public class ModelDiffTest {
|
||||
class ModelDiffTest {
|
||||
|
||||
@Test
|
||||
public void test_compareTo_with_dropColumnOnHistoryTable_then_historyColumnRegistered() throws Exception {
|
||||
|
||||
void test_compareTo_with_dropColumnOnHistoryTable_then_historyColumnRegistered() throws Exception {
|
||||
ModelContainer base = new ModelContainer();
|
||||
base.addTable(MTableTest.base().setWithHistory(true));
|
||||
|
||||
@@ -24,4 +27,27 @@ public class ModelDiffTest {
|
||||
assertThat(tab.allHistoryColumns(true)).contains("status");
|
||||
assertThat(tab.allColumns()).extracting("name").doesNotContain("status");
|
||||
}
|
||||
|
||||
@Test
|
||||
void schemaDiff() {
|
||||
ModelContainer base = new ModelContainer();
|
||||
base.addTable(new MTable("foo.one"));
|
||||
base.addTable(new MTable("bar.two"));
|
||||
|
||||
ModelDiff modelDiff = new ModelDiff(base);
|
||||
|
||||
ModelContainer newOne = new ModelContainer();
|
||||
newOne.addTable(new MTable("bazz.three"));
|
||||
newOne.addTable(new MTable("foo.one"));
|
||||
newOne.addTable(new MTable("buzz.four"));
|
||||
|
||||
modelDiff.compareTo(newOne);
|
||||
ChangeSet apply = modelDiff.getApplyChangeSet();
|
||||
List<Object> children = apply.getChangeSetChildren();
|
||||
assertThat(children).hasSize(4);
|
||||
assertThat(((CreateSchema) children.get(0)).getName()).isEqualTo("bazz");
|
||||
assertThat(((CreateSchema) children.get(1)).getName()).isEqualTo("buzz");
|
||||
assertThat(children.get(2)).isInstanceOf(CreateTable.class);
|
||||
assertThat(children.get(3)).isInstanceOf(CreateTable.class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user