Browse Source

Migration fixed.

pull/218/head
Sebastian Stehle 8 years ago
parent
commit
603e2eb7ab
  1. 4
      src/Squidex.Infrastructure.GetEventStore/EventSourcing/ProjectionClient.cs
  2. 196
      src/Squidex/Areas/Api/Controllers/Content/ContentsController.cs
  3. 14
      src/Squidex/Areas/Api/Controllers/Content/Generator/SchemaSwaggerGenerator.cs
  4. 7
      src/Squidex/Config/Domain/WriteServices.cs
  5. 38
      tools/Migrate_01/Migration05_RebuildForNewCommands.cs
  6. 56
      tools/Migrate_01/MigrationPath.cs
  7. 15
      tools/Migrate_01/Migrations/RebuildAssets.cs
  8. 4
      tools/Migrate_01/Migrations/RebuildContents.cs
  9. 3
      tools/Migrate_01/SquidexMigrations.cs

4
src/Squidex.Infrastructure.GetEventStore/EventSourcing/ProjectionClient.cs

@ -35,12 +35,12 @@ namespace Squidex.Infrastructure.EventSourcing
private string CreateFilterProjectionName(string filter) private string CreateFilterProjectionName(string filter)
{ {
return $"by-{prefix.Simplify()}-{filter.Simplify()}"; return $"by-{prefix.Slugify()}-{filter.Slugify()}";
} }
private string CreatePropertyProjectionName(string property) private string CreatePropertyProjectionName(string property)
{ {
return $"by-{prefix.Simplify()}-{property.Simplify()}-property"; return $"by-{prefix.Slugify()}-{property.Slugify()}-property";
} }
public async Task<string> CreateProjectionAsync(string property, object value) public async Task<string> CreateProjectionAsync(string property, object value)

196
src/Squidex/Areas/Api/Controllers/Content/ContentsController.cs

@ -44,12 +44,24 @@ namespace Squidex.Areas.Api.Controllers.Contents
this.graphQl = graphQl; this.graphQl = graphQl;
} }
/// <summary>
/// GraphQL endpoint.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="query">The graphql endpoint.</param>
/// <returns>
/// 200 => Contents retrieved or mutated.
/// 404 => Schema or app not found.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppReader] [MustBeAppReader]
[HttpGet] [HttpGet]
[HttpPost] [HttpPost]
[Route("content/{app}/graphql/")] [Route("content/{app}/graphql/")]
[ApiCosts(2)] [ApiCosts(2)]
public async Task<IActionResult> PostGraphQL([FromBody] GraphQLQuery query) public async Task<IActionResult> PostGraphQL(string app, [FromBody] GraphQLQuery query)
{ {
var result = await graphQl.QueryAsync(App, User, query); var result = await graphQl.QueryAsync(App, User, query);
@ -63,11 +75,25 @@ namespace Squidex.Areas.Api.Controllers.Contents
} }
} }
/// <summary>
/// Queries contents.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="ids">The optional ids of the content to fetch.</param>
/// <param name="archived">Indicates whether to query content items from the archive.</param>
/// <returns>
/// 200 => Contents retrieved.
/// 404 => Schema or app not found.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppReader] [MustBeAppReader]
[HttpGet] [HttpGet]
[Route("content/{app}/{name}/")] [Route("content/{app}/{name}/")]
[ApiCosts(2)] [ApiCosts(2)]
public async Task<IActionResult> GetContents(string name, [FromQuery] bool archived = false, [FromQuery] string ids = null) public async Task<IActionResult> GetContents(string app, string name, [FromQuery] bool archived = false, [FromQuery] string ids = null)
{ {
HashSet<Guid> idsList = null; HashSet<Guid> idsList = null;
@ -112,11 +138,24 @@ namespace Squidex.Areas.Api.Controllers.Contents
return Ok(response); return Ok(response);
} }
/// <summary>
/// Get a content item.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="id">The id of the content to fetch.</param>
/// <returns>
/// 200 => Content found.
/// 404 => Content, schema or app not found.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppReader] [MustBeAppReader]
[HttpGet] [HttpGet]
[Route("content/{app}/{name}/{id}/")] [Route("content/{app}/{name}/{id}/")]
[ApiCosts(1)] [ApiCosts(1)]
public async Task<IActionResult> GetContent(string name, Guid id) public async Task<IActionResult> GetContent(string app, string name, Guid id)
{ {
var (schema, entity) = await contentQuery.FindContentAsync(App, name, User, id); var (schema, entity) = await contentQuery.FindContentAsync(App, name, User, id);
@ -135,11 +174,26 @@ namespace Squidex.Areas.Api.Controllers.Contents
return Ok(response); return Ok(response);
} }
/// <summary>
/// Get a content item with a specific version.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="id">The id of the content to fetch.</param>
/// <param name="version">The version fo the content to fetch.</param>
/// <returns>
/// 200 => Content found.
/// 404 => Content, schema or app not found.
/// 400 => Content data is not valid.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppReader] [MustBeAppReader]
[HttpGet] [HttpGet]
[Route("content/{app}/{name}/{id}/{version}/")] [Route("content/{app}/{name}/{id}/{version}/")]
[ApiCosts(1)] [ApiCosts(1)]
public async Task<IActionResult> GetContentVersion(string name, Guid id, int version) public async Task<IActionResult> GetContentVersion(string app, string name, Guid id, int version)
{ {
var content = await contentQuery.FindContentAsync(App, name, User, id, version); var content = await contentQuery.FindContentAsync(App, name, User, id, version);
@ -157,11 +211,26 @@ namespace Squidex.Areas.Api.Controllers.Contents
return Ok(response.Data); return Ok(response.Data);
} }
/// <summary>
/// Create a content item.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="request">The full data for the content item.</param>
/// <param name="publish">Indicates whether the content should be published immediately.</param>
/// <returns>
/// 201 => Content created.
/// 404 => Content, schema or app not found.
/// 400 => Content data is not valid.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppEditor] [MustBeAppEditor]
[HttpPost] [HttpPost]
[Route("content/{app}/{name}/")] [Route("content/{app}/{name}/")]
[ApiCosts(1)] [ApiCosts(1)]
public async Task<IActionResult> PostContent(string name, [FromBody] NamedContentData request, [FromQuery] bool publish = false) public async Task<IActionResult> PostContent(string app, string name, [FromBody] NamedContentData request, [FromQuery] bool publish = false)
{ {
await contentQuery.FindSchemaAsync(App, name); await contentQuery.FindSchemaAsync(App, name);
@ -175,11 +244,26 @@ namespace Squidex.Areas.Api.Controllers.Contents
return CreatedAtAction(nameof(GetContent), new { id = command.ContentId }, response); return CreatedAtAction(nameof(GetContent), new { id = command.ContentId }, response);
} }
/// <summary>
/// Update a content item.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="id">The id of the content item to update.</param>
/// <param name="request">The full data for the content item.</param>
/// <returns>
/// 200 => Content updated.
/// 404 => Content, schema or app not found.
/// 400 => Content data is not valid.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppEditor] [MustBeAppEditor]
[HttpPut] [HttpPut]
[Route("content/{app}/{name}/{id}/")] [Route("content/{app}/{name}/{id}/")]
[ApiCosts(1)] [ApiCosts(1)]
public async Task<IActionResult> PutContent(string name, Guid id, [FromBody] NamedContentData request) public async Task<IActionResult> PutContent(string app, string name, Guid id, [FromBody] NamedContentData request)
{ {
await contentQuery.FindSchemaAsync(App, name); await contentQuery.FindSchemaAsync(App, name);
@ -193,11 +277,26 @@ namespace Squidex.Areas.Api.Controllers.Contents
return Ok(response); return Ok(response);
} }
/// <summary>
/// Patchs a content item.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="id">The id of the content item to patch.</param>
/// <param name="request">The patch for the content item.</param>
/// <returns>
/// 200 => Content patched.
/// 404 => Content, schema or app not found.
/// 400 => Content patch is not valid.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppEditor] [MustBeAppEditor]
[HttpPatch] [HttpPatch]
[Route("content/{app}/{name}/{id}/")] [Route("content/{app}/{name}/{id}/")]
[ApiCosts(1)] [ApiCosts(1)]
public async Task<IActionResult> PatchContent(string name, Guid id, [FromBody] NamedContentData request) public async Task<IActionResult> PatchContent(string app, string name, Guid id, [FromBody] NamedContentData request)
{ {
await contentQuery.FindSchemaAsync(App, name); await contentQuery.FindSchemaAsync(App, name);
@ -211,11 +310,26 @@ namespace Squidex.Areas.Api.Controllers.Contents
return Ok(response); return Ok(response);
} }
/// <summary>
/// Publish a content item.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="id">The id of the content item to publish.</param>
/// <param name="dueTime">The date and time when the content should be published.</param>
/// <returns>
/// 204 => Content published.
/// 404 => Content, schema or app not found.
/// 400 => Content was already published.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppEditor] [MustBeAppEditor]
[HttpPut] [HttpPut]
[Route("content/{app}/{name}/{id}/publish/")] [Route("content/{app}/{name}/{id}/publish/")]
[ApiCosts(1)] [ApiCosts(1)]
public async Task<IActionResult> PublishContent(string name, Guid id, string dueTime = null) public async Task<IActionResult> PublishContent(string app, string name, Guid id, string dueTime = null)
{ {
await contentQuery.FindSchemaAsync(App, name); await contentQuery.FindSchemaAsync(App, name);
@ -226,11 +340,26 @@ namespace Squidex.Areas.Api.Controllers.Contents
return NoContent(); return NoContent();
} }
/// <summary>
/// Unpublish a content item.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="id">The id of the content item to unpublish.</param>
/// <param name="dueTime">The date and time when the content should be unpublished.</param>
/// <returns>
/// 204 => Content unpublished.
/// 404 => Content, schema or app not found.
/// 400 => Content was not published.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppEditor] [MustBeAppEditor]
[HttpPut] [HttpPut]
[Route("content/{app}/{name}/{id}/unpublish/")] [Route("content/{app}/{name}/{id}/unpublish/")]
[ApiCosts(1)] [ApiCosts(1)]
public async Task<IActionResult> UnpublishContent(string name, Guid id, string dueTime = null) public async Task<IActionResult> UnpublishContent(string app, string name, Guid id, string dueTime = null)
{ {
await contentQuery.FindSchemaAsync(App, name); await contentQuery.FindSchemaAsync(App, name);
@ -241,11 +370,26 @@ namespace Squidex.Areas.Api.Controllers.Contents
return NoContent(); return NoContent();
} }
/// <summary>
/// Archive a content item.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="id">The id of the content item to archive.</param>
/// <param name="dueTime">The date and time when the content should be archived.</param>
/// <returns>
/// 204 => Content archived.
/// 404 => Content, schema or app not found.
/// 400 => Content was already archived.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppEditor] [MustBeAppEditor]
[HttpPut] [HttpPut]
[Route("content/{app}/{name}/{id}/archive/")] [Route("content/{app}/{name}/{id}/archive/")]
[ApiCosts(1)] [ApiCosts(1)]
public async Task<IActionResult> ArchiveContent(string name, Guid id, string dueTime = null) public async Task<IActionResult> ArchiveContent(string app, string name, Guid id, string dueTime = null)
{ {
await contentQuery.FindSchemaAsync(App, name); await contentQuery.FindSchemaAsync(App, name);
@ -256,11 +400,26 @@ namespace Squidex.Areas.Api.Controllers.Contents
return NoContent(); return NoContent();
} }
/// <summary>
/// Restore a content item.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="id">The id of the content item to restore.</param>
/// <param name="dueTime">The date and time when the content should be restored.</param>
/// <returns>
/// 204 => Content restored.
/// 404 => Content, schema or app not found.
/// 400 => Content was not archived.
/// </returns>
/// <remarks>
/// You can read the generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppEditor] [MustBeAppEditor]
[HttpPut] [HttpPut]
[Route("content/{app}/{name}/{id}/restore/")] [Route("content/{app}/{name}/{id}/restore/")]
[ApiCosts(1)] [ApiCosts(1)]
public async Task<IActionResult> RestoreContent(string name, Guid id, string dueTime = null) public async Task<IActionResult> RestoreContent(string app, string name, Guid id, string dueTime = null)
{ {
await contentQuery.FindSchemaAsync(App, name); await contentQuery.FindSchemaAsync(App, name);
@ -271,11 +430,24 @@ namespace Squidex.Areas.Api.Controllers.Contents
return NoContent(); return NoContent();
} }
/// <summary>
/// Delete a content item.
/// </summary>
/// <param name="app">The name of the app.</param>
/// <param name="name">The name of the schema.</param>
/// <param name="id">The id of the content item to delete.</param>
/// <returns>
/// 204 => Content has been deleted.
/// 404 => Content, schema or app not found.
/// </returns>
/// <remarks>
/// You can create an generated documentation for your app at /api/content/{appName}/docs
/// </remarks>
[MustBeAppEditor] [MustBeAppEditor]
[HttpDelete] [HttpDelete]
[Route("content/{app}/{name}/{id}/")] [Route("content/{app}/{name}/{id}/")]
[ApiCosts(1)] [ApiCosts(1)]
public async Task<IActionResult> DeleteContent(string name, Guid id) public async Task<IActionResult> DeleteContent(string app, string name, Guid id)
{ {
await contentQuery.FindSchemaAsync(App, name); await contentQuery.FindSchemaAsync(App, name);

14
src/Squidex/Areas/Api/Controllers/Content/Generator/SchemaSwaggerGenerator.cs

@ -148,7 +148,7 @@ namespace Squidex.Areas.Api.Controllers.Contents.Generator
operation.AddBodyParameter("data", dataSchema, SchemaBodyDescription); operation.AddBodyParameter("data", dataSchema, SchemaBodyDescription);
operation.AddQueryParameter("publish", JsonObjectType.Boolean, "Set to true to autopublish content."); operation.AddQueryParameter("publish", JsonObjectType.Boolean, "Set to true to autopublish content.");
operation.AddResponse("201", $"{schemaName} created.", contentSchema); operation.AddResponse("201", $"{schemaName} content created.", contentSchema);
}); });
} }
@ -162,7 +162,7 @@ namespace Squidex.Areas.Api.Controllers.Contents.Generator
operation.AddBodyParameter("data", dataSchema, SchemaBodyDescription); operation.AddBodyParameter("data", dataSchema, SchemaBodyDescription);
operation.AddResponse("201", $"{schemaName} item updated.", dataSchema); operation.AddResponse("200", $"{schemaName} content updated.", dataSchema);
}); });
} }
@ -176,7 +176,7 @@ namespace Squidex.Areas.Api.Controllers.Contents.Generator
operation.AddBodyParameter("data", dataSchema, SchemaBodyDescription); operation.AddBodyParameter("data", dataSchema, SchemaBodyDescription);
operation.AddResponse("201", $"{schemaName} item patched.", dataSchema); operation.AddResponse("200", $"{schemaName} content patched.", dataSchema);
}); });
} }
@ -188,7 +188,7 @@ namespace Squidex.Areas.Api.Controllers.Contents.Generator
operation.Summary = $"Publish a {schemaName} content."; operation.Summary = $"Publish a {schemaName} content.";
operation.Security = EditorSecurity; operation.Security = EditorSecurity;
operation.AddResponse("204", $"{schemaName} item published."); operation.AddResponse("204", $"{schemaName} content published.");
}); });
} }
@ -200,7 +200,7 @@ namespace Squidex.Areas.Api.Controllers.Contents.Generator
operation.Summary = $"Unpublish a {schemaName} content."; operation.Summary = $"Unpublish a {schemaName} content.";
operation.Security = EditorSecurity; operation.Security = EditorSecurity;
operation.AddResponse("204", $"{schemaName} item unpublished."); operation.AddResponse("204", $"{schemaName} content unpublished.");
}); });
} }
@ -212,7 +212,7 @@ namespace Squidex.Areas.Api.Controllers.Contents.Generator
operation.Summary = $"Archive a {schemaName} content."; operation.Summary = $"Archive a {schemaName} content.";
operation.Security = EditorSecurity; operation.Security = EditorSecurity;
operation.AddResponse("204", $"{schemaName} item restored."); operation.AddResponse("204", $"{schemaName} content restored.");
}); });
} }
@ -224,7 +224,7 @@ namespace Squidex.Areas.Api.Controllers.Contents.Generator
operation.Summary = $"Restore a {schemaName} content."; operation.Summary = $"Restore a {schemaName} content.";
operation.Security = EditorSecurity; operation.Security = EditorSecurity;
operation.AddResponse("204", $"{schemaName} item restored."); operation.AddResponse("204", $"{schemaName} content restored.");
}); });
} }

7
src/Squidex/Config/Domain/WriteServices.cs

@ -77,16 +77,13 @@ namespace Squidex.Config.Domain
services.AddTransientAs<AddPatterns>() services.AddTransientAs<AddPatterns>()
.As<IMigration>(); .As<IMigration>();
services.AddTransientAs<RebuildContentCollections>() services.AddTransientAs<RebuildContents>()
.As<IMigration>(); .As<IMigration>();
services.AddTransientAs<RebuildSnapshots>() services.AddTransientAs<RebuildSnapshots>()
.As<IMigration>(); .As<IMigration>();
services.AddTransientAs<Migration04_FlattenAssetEntity>() services.AddTransientAs<RebuildAssets>()
.As<IMigration>();
services.AddTransientAs<Migration05_RebuildForNewCommands>()
.As<IMigration>(); .As<IMigration>();
services.AddTransientAs<Rebuilder>() services.AddTransientAs<Rebuilder>()

38
tools/Migrate_01/Migration05_RebuildForNewCommands.cs

@ -1,38 +0,0 @@
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschränkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Squidex.Infrastructure.Migrations;
namespace Migrate_01
{
public sealed class Migration05_RebuildForNewCommands : IMigration
{
private readonly Rebuilder rebuilder;
public int FromVersion { get; } = 4;
public int ToVersion { get; } = 5;
public Migration05_RebuildForNewCommands(Rebuilder rebuilder)
{
this.rebuilder = rebuilder;
}
public async Task UpdateAsync(IEnumerable<IMigration> previousMigrations)
{
if (!previousMigrations.Any(x => x is Migration01_FromCqrs))
{
await rebuilder.RebuildConfigAsync();
await rebuilder.RebuildContentAsync();
await rebuilder.RebuildAssetsAsync();
}
}
}
}

56
tools/Migrate_01/MigrationPath.cs

@ -15,6 +15,7 @@ namespace Migrate_01
{ {
public sealed class MigrationPath : IMigrationPath public sealed class MigrationPath : IMigrationPath
{ {
private const int CurrentVersion = 6;
private readonly IServiceProvider serviceProvider; private readonly IServiceProvider serviceProvider;
public MigrationPath(IServiceProvider serviceProvider) public MigrationPath(IServiceProvider serviceProvider)
@ -24,41 +25,32 @@ namespace Migrate_01
public (int Version, IEnumerable<IMigration> Migrations) GetNext(int version) public (int Version, IEnumerable<IMigration> Migrations) GetNext(int version)
{ {
switch (version) if (version == CurrentVersion)
{ {
case 0: return (CurrentVersion, null);
return (4,
new IMigration[]
{
serviceProvider.GetRequiredService<ConvertEventStore>(),
serviceProvider.GetRequiredService<RebuildSnapshots>(),
serviceProvider.GetRequiredService<AddPatterns>()
});
case 1:
return (4,
new IMigration[]
{
serviceProvider.GetRequiredService<ConvertEventStore>(),
serviceProvider.GetRequiredService<AddPatterns>(),
serviceProvider.GetRequiredService<RebuildContentCollections>()
});
case 2:
return (4,
new IMigration[]
{
serviceProvider.GetRequiredService<ConvertEventStore>(),
serviceProvider.GetRequiredService<AddPatterns>(),
serviceProvider.GetRequiredService<RebuildContentCollections>()
});
case 3:
return (4,
new IMigration[]
{
serviceProvider.GetRequiredService<ConvertEventStore>()
});
} }
return (0, null); var migrations = new List<IMigration>();
// Version 6: Convert Event store. Must always be executed first.
if (version < 6)
{
migrations.Add(serviceProvider.GetRequiredService<ConvertEventStore>());
}
// Version 5: Fixes the broken command architecture and requires a rebuild of all snapshots.
if (version < 5)
{
migrations.Add(serviceProvider.GetRequiredService<RebuildSnapshots>());
}
// Version 1: Introduce App patterns.
if (version <= 1)
{
migrations.Add(serviceProvider.GetRequiredService<AddPatterns>());
}
return (CurrentVersion, migrations);
} }
} }
} }

15
tools/Migrate_01/Migration04_FlattenAssetEntity.cs → tools/Migrate_01/Migrations/RebuildAssets.cs

@ -12,25 +12,18 @@ using Squidex.Infrastructure.Migrations;
namespace Migrate_01 namespace Migrate_01
{ {
public class Migration04_FlattenAssetEntity : IMigration public class RebuildAssets : IMigration
{ {
private readonly Rebuilder rebuilder; private readonly Rebuilder rebuilder;
public int FromVersion { get; } = 3; public RebuildAssets(Rebuilder rebuilder)
public int ToVersion { get; } = 4;
public Migration04_FlattenAssetEntity(Rebuilder rebuilder)
{ {
this.rebuilder = rebuilder; this.rebuilder = rebuilder;
} }
public async Task UpdateAsync(IEnumerable<IMigration> previousMigrations) public Task UpdateAsync()
{ {
if (!previousMigrations.Any(x => x is Migration01_FromCqrs)) return rebuilder.RebuildAssetsAsync();
{
await rebuilder.RebuildAssetsAsync();
}
} }
} }
} }

4
tools/Migrate_01/Migrations/RebuildContentCollections.cs → tools/Migrate_01/Migrations/RebuildContents.cs

@ -10,11 +10,11 @@ using Squidex.Infrastructure.Migrations;
namespace Migrate_01.Migrations namespace Migrate_01.Migrations
{ {
public class RebuildContentCollections : IMigration public class RebuildContents : IMigration
{ {
private readonly Rebuilder rebuilder; private readonly Rebuilder rebuilder;
public RebuildContentCollections(Rebuilder rebuilder) public RebuildContents(Rebuilder rebuilder)
{ {
this.rebuilder = rebuilder; this.rebuilder = rebuilder;
} }

3
tools/Migrate_01/SquidexMigrations.cs

@ -5,9 +5,12 @@
// All rights reserved. Licensed under the MIT license. // All rights reserved. Licensed under the MIT license.
// ========================================================================== // ==========================================================================
using System.Reflection;
namespace Migrate_01 namespace Migrate_01
{ {
public static class SquidexMigrations public static class SquidexMigrations
{ {
public static readonly Assembly Assembly = typeof(SquidexMigrations).Assembly;
} }
} }

Loading…
Cancel
Save