Package com.onec.schema
Record Class SchemaChange
java.lang.Object
java.lang.Record
com.onec.schema.SchemaChange
public record SchemaChange(SchemaChange.Type type, String table, String column, String detail, boolean destructive, List<String> sql)
extends Record
One change in a
MigrationPlan: what it is, the SQL that performs it, and whether
it can lose data (destructive changes are skipped unless
onec.schema.allow-destructive=true).-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSchemaChange(SchemaChange.Type type, String table, String column, String detail, boolean destructive, List<String> sql) Creates an instance of aSchemaChangerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolumn()Returns the value of thecolumnrecord component.describe()booleanReturns the value of thedestructiverecord component.detail()Returns the value of thedetailrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sql()Returns the value of thesqlrecord component.table()Returns the value of thetablerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
SchemaChange
public SchemaChange(SchemaChange.Type type, String table, String column, String detail, boolean destructive, List<String> sql) Creates an instance of aSchemaChangerecord class.- Parameters:
type- the value for thetyperecord componenttable- the value for thetablerecord componentcolumn- the value for thecolumnrecord componentdetail- the value for thedetailrecord componentdestructive- the value for thedestructiverecord componentsql- the value for thesqlrecord component
-
-
Method Details
-
describe
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
table
Returns the value of thetablerecord component.- Returns:
- the value of the
tablerecord component
-
column
Returns the value of thecolumnrecord component.- Returns:
- the value of the
columnrecord component
-
detail
Returns the value of thedetailrecord component.- Returns:
- the value of the
detailrecord component
-
destructive
public boolean destructive()Returns the value of thedestructiverecord component.- Returns:
- the value of the
destructiverecord component
-
sql
Returns the value of thesqlrecord component.- Returns:
- the value of the
sqlrecord component
-