mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-14 06:45:21 +00:00
Merge pull request #2571 from FOCONIS/ddl-sqlite
[DDL-SqLite] Modified SqLite platform to generate at least non failing migration scripts
This commit is contained in:
4 files changed
+119
-65
No files matched your search
+46
-3
@@ -5,7 +5,10 @@ import io.ebeaninternal.dbmigration.ddlgeneration.DdlBuffer;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.DdlOptions;
|
||||
|
||||
/**
|
||||
* DB2 platform specific DDL.
|
||||
* SQLite platform specific DDL.
|
||||
*
|
||||
* Note: SQLite has very limited alter capabilities. Altering a column is not
|
||||
* supported and may need a recreation of the whole table
|
||||
*/
|
||||
public class SQLiteDdl extends PlatformDdl {
|
||||
|
||||
@@ -27,7 +30,47 @@ public class SQLiteDdl extends PlatformDdl {
|
||||
|
||||
@Override
|
||||
public String alterTableAddForeignKey(DdlOptions options, WriteForeignKey request) {
|
||||
// not supported
|
||||
return null;
|
||||
return "-- not supported: " + super.alterTableAddForeignKey(options, request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String alterTableDropForeignKey(String tableName, String fkName) {
|
||||
return "-- not supported: " + super.alterTableDropForeignKey(tableName, fkName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String alterTableAddCheckConstraint(String tableName, String checkConstraintName, String checkConstraint) {
|
||||
return "-- not supported: " + super.alterTableAddCheckConstraint(tableName, checkConstraintName, checkConstraint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String alterTableDropConstraint(String tableName, String constraintName) {
|
||||
return "-- not supported: " + super.alterTableDropConstraint(tableName, constraintName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String alterTableAddUniqueConstraint(String tableName, String uqName, String[] columns, String[] nullableColumns) {
|
||||
return "-- not supported: " + super.alterTableAddUniqueConstraint(tableName, uqName, columns, nullableColumns);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String alterTableDropUniqueConstraint(String tableName, String uniqueConstraintName) {
|
||||
return "-- not supported: " + super.alterTableDropUniqueConstraint(tableName, uniqueConstraintName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String alterColumnDefaultValue(String tableName, String columnName, String defaultValue) {
|
||||
return "-- not supported: " + super.alterColumnDefaultValue(tableName, columnName, defaultValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String alterColumnType(String tableName, String columnName, String type) {
|
||||
return "-- not supported: " + super.alterColumnType(tableName, columnName, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String alterColumnNotnull(String tableName, String columnName, boolean notnull) {
|
||||
return "-- not supported: " + super.alterColumnNotnull(tableName, columnName, notnull);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user