Add schema support to BaseEntityBuilder
This commit is contained in:
parent
2771f0301a
commit
35b9551bfb
|
@ -18,6 +18,7 @@ namespace Oqtane.Migrations.EntityBuilders
|
||||||
_migrationBuilder = migrationBuilder;
|
_migrationBuilder = migrationBuilder;
|
||||||
ActiveDatabase = database;
|
ActiveDatabase = database;
|
||||||
ForeignKeys = new List<ForeignKey<TEntityBuilder>>();
|
ForeignKeys = new List<ForeignKey<TEntityBuilder>>();
|
||||||
|
Schema = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IDatabase ActiveDatabase { get; }
|
protected IDatabase ActiveDatabase { get; }
|
||||||
|
@ -30,6 +31,8 @@ namespace Oqtane.Migrations.EntityBuilders
|
||||||
|
|
||||||
protected List<ForeignKey<TEntityBuilder>> ForeignKeys { get; }
|
protected List<ForeignKey<TEntityBuilder>> ForeignKeys { get; }
|
||||||
|
|
||||||
|
protected string Schema { get; init; }
|
||||||
|
|
||||||
private string RewriteName(string name)
|
private string RewriteName(string name)
|
||||||
{
|
{
|
||||||
return ActiveDatabase.RewriteName(name);
|
return ActiveDatabase.RewriteName(name);
|
||||||
|
@ -319,7 +322,7 @@ namespace Oqtane.Migrations.EntityBuilders
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Create()
|
public void Create()
|
||||||
{
|
{
|
||||||
_migrationBuilder.CreateTable(RewriteName(EntityTableName), BuildTable, null, AddKeys);
|
_migrationBuilder.CreateTable(RewriteName(EntityTableName), BuildTable, Schema, AddKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user