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