mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
2.2 KiB
51 lines
2.2 KiB
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Squidex.Domain.Apps.Entities.Apps.DomainObject;
|
|
using Squidex.Domain.Apps.Entities.Assets.DomainObject;
|
|
using Squidex.Domain.Apps.Entities.Contents.DomainObject;
|
|
using Squidex.Domain.Apps.Entities.Rules.DomainObject;
|
|
using Squidex.Domain.Apps.Entities.Schemas.DomainObject;
|
|
using Squidex.Infrastructure.Commands;
|
|
|
|
namespace Migrations
|
|
{
|
|
public static class RebuilderExtensions
|
|
{
|
|
public static Task RebuildAppsAsync(this Rebuilder rebuilder, CancellationToken ct = default)
|
|
{
|
|
return rebuilder.RebuildAsync<AppDomainObject, AppDomainObject.State>("^app\\-", ct);
|
|
}
|
|
|
|
public static Task RebuildSchemasAsync(this Rebuilder rebuilder, CancellationToken ct = default)
|
|
{
|
|
return rebuilder.RebuildAsync<SchemaDomainObject, SchemaDomainObject.State>("^schema\\-", ct);
|
|
}
|
|
|
|
public static Task RebuildRulesAsync(this Rebuilder rebuilder, CancellationToken ct = default)
|
|
{
|
|
return rebuilder.RebuildAsync<RuleDomainObject, RuleDomainObject.State>("^rule\\-", ct);
|
|
}
|
|
|
|
public static Task RebuildAssetsAsync(this Rebuilder rebuilder, CancellationToken ct = default)
|
|
{
|
|
return rebuilder.RebuildAsync<AssetDomainObject, AssetDomainObject.State>("^asset\\-", ct);
|
|
}
|
|
|
|
public static Task RebuildAssetFoldersAsync(this Rebuilder rebuilder, CancellationToken ct = default)
|
|
{
|
|
return rebuilder.RebuildAsync<AssetFolderDomainObject, AssetFolderDomainObject.State>("^assetFolder\\-", ct);
|
|
}
|
|
|
|
public static Task RebuildContentAsync(this Rebuilder rebuilder, CancellationToken ct = default)
|
|
{
|
|
return rebuilder.RebuildAsync<ContentDomainObject, ContentDomainObject.State>("^content\\-", ct);
|
|
}
|
|
}
|
|
}
|