Added suuport to inject an IOqtaneDatabase in EntityBuilders to allow each Database to control certain Migration behaviors. Also updated Installer to dynamically build Database Configuration section
This commit is contained in:
@ -6,14 +6,6 @@ namespace Oqtane.Migrations.Extensions
|
||||
{
|
||||
public static class ColumnsBuilderExtensions
|
||||
{
|
||||
public static OperationBuilder<AddColumnOperation> AddAutoIncrementColumn(this ColumnsBuilder table, string name)
|
||||
{
|
||||
return table.Column<int>(name: name, nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1")
|
||||
.Annotation("Sqlite:Autoincrement", true)
|
||||
.Annotation("MySql:ValueGeneratedOnAdd", true);
|
||||
}
|
||||
|
||||
public static OperationBuilder<AddColumnOperation> AddBooleanColumn(this ColumnsBuilder table, string name, bool nullable = false)
|
||||
{
|
||||
return table.Column<bool>(name: name, nullable: nullable);
|
||||
@ -36,12 +28,12 @@ namespace Oqtane.Migrations.Extensions
|
||||
|
||||
public static OperationBuilder<AddColumnOperation> AddMaxStringColumn(this ColumnsBuilder table, string name, bool nullable = false)
|
||||
{
|
||||
return table.Column<string>(name: name, nullable: nullable);
|
||||
return table.Column<string>(name: name, nullable: nullable, unicode: true);
|
||||
}
|
||||
|
||||
public static OperationBuilder<AddColumnOperation> AddStringColumn(this ColumnsBuilder table, string name, int length, bool nullable = false)
|
||||
{
|
||||
return table.Column<string>(name: name, maxLength: length, nullable: nullable);
|
||||
return table.Column<string>(name: name, maxLength: length, nullable: nullable, unicode: true);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user