Fix build after merge
This commit is contained in:
@@ -12,8 +12,8 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFiveZer
|
||||
[Migration("7.5.0", 1, GlobalSettings.UmbracoMigrationName)]
|
||||
public class RemoveStylesheetDataAndTablesAgain : MigrationBase
|
||||
{
|
||||
public RemoveStylesheetDataAndTablesAgain(ISqlSyntaxProvider sqlSyntax, ILogger logger)
|
||||
: base(sqlSyntax, logger)
|
||||
public RemoveStylesheetDataAndTablesAgain(IMigrationContext context)
|
||||
: base(context)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFiveZer
|
||||
[Migration("7.5.0", 2, GlobalSettings.UmbracoMigrationName)]
|
||||
public class UpdateUniqueIndexOnCmsPropertyData : MigrationBase
|
||||
{
|
||||
public UpdateUniqueIndexOnCmsPropertyData(ISqlSyntaxProvider sqlSyntax, ILogger logger)
|
||||
: base(sqlSyntax, logger)
|
||||
public UpdateUniqueIndexOnCmsPropertyData(IMigrationContext context)
|
||||
: base(context)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -34,14 +34,14 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFiveZer
|
||||
if (found != null)
|
||||
{
|
||||
//Check for MySQL
|
||||
if (Context.CurrentDatabaseProvider == DatabaseProviders.MySql)
|
||||
if (DatabaseType.IsMySql())
|
||||
{
|
||||
//Use the special double nested sub query for MySQL since that is the only
|
||||
//way delete sub queries works
|
||||
var delPropQry = SqlSyntax.GetDeleteSubquery(
|
||||
"cmsPropertyData",
|
||||
"id",
|
||||
new Sql("SELECT MIN(id) FROM cmsPropertyData GROUP BY contentNodeId, versionId, propertytypeid HAVING MIN(id) IS NOT NULL"),
|
||||
Context.Database.Sql("SELECT MIN(id) FROM cmsPropertyData GROUP BY contentNodeId, versionId, propertytypeid HAVING MIN(id) IS NOT NULL"),
|
||||
WhereInType.NotIn);
|
||||
Execute.Sql(delPropQry.SQL);
|
||||
}
|
||||
|
||||
@@ -91,12 +91,17 @@ namespace Umbraco.Core.Persistence
|
||||
EnableSqlTrace = false;
|
||||
}
|
||||
|
||||
// fixme: that could be an extension method of IUmbracoDatabaseConfig
|
||||
// fixme: these two could be an extension method of IUmbracoDatabaseConfig
|
||||
public Sql<SqlContext> Sql()
|
||||
{
|
||||
return NPoco.Sql.BuilderFor(new SqlContext(this));
|
||||
}
|
||||
|
||||
public Sql<SqlContext> Sql(string sql, params object[] args)
|
||||
{
|
||||
return NPoco.Sql.BuilderFor(new SqlContext(this)).Append(sql, args);
|
||||
}
|
||||
|
||||
protected override DbConnection OnConnectionOpened(DbConnection connection)
|
||||
{
|
||||
if (connection == null) throw new ArgumentNullException(nameof(connection));
|
||||
|
||||
Reference in New Issue
Block a user