-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from jcdcdev/dev
0.3.1
- Loading branch information
Showing
10 changed files
with
107 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/jcdcdev.Umbraco.ReadingTime/Infrastructure/Migrations/0.1.0/InitialMigration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using Umbraco.Cms.Infrastructure.Migrations; | ||
|
||
namespace jcdcdev.Umbraco.ReadingTime.Infrastructure.Migrations; | ||
|
||
public class InitialMigration : NoopMigration | ||
{ | ||
public InitialMigration(IMigrationContext context) : base(context) | ||
{ | ||
} | ||
} |
34 changes: 0 additions & 34 deletions
34
...cdev.Umbraco.ReadingTime/Infrastructure/Migrations/0.2.0/MultiplePropertyEditorSupport.cs
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
...cdev.Umbraco.ReadingTime/Infrastructure/Migrations/0.3.0/MultiplePropertyEditorSupport.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using Umbraco.Cms.Infrastructure.Migrations; | ||
|
||
namespace jcdcdev.Umbraco.ReadingTime.Infrastructure.Migrations; | ||
|
||
public class MultiplePropertyEditorSupport : NoopMigration | ||
{ | ||
public MultiplePropertyEditorSupport(IMigrationContext context) : base(context) | ||
{ | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/jcdcdev.Umbraco.ReadingTime/Infrastructure/Migrations/0.3.1/RebuildDatabase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using jcdcdev.Umbraco.ReadingTime.Core; | ||
using jcdcdev.Umbraco.ReadingTime.Infrastructure.Persistence; | ||
using Microsoft.Extensions.Logging; | ||
using Umbraco.Cms.Infrastructure.Migrations; | ||
|
||
namespace jcdcdev.Umbraco.ReadingTime.Infrastructure.Migrations; | ||
|
||
public class RebuildDatabase : MigrationBase | ||
{ | ||
private readonly IReadingTimeService _readingTimeService; | ||
|
||
public RebuildDatabase(IMigrationContext context, IReadingTimeService readingTimeService) : base(context) | ||
{ | ||
_readingTimeService = readingTimeService; | ||
} | ||
|
||
protected override void Migrate() | ||
{ | ||
Logger.LogInformation("Rebuilding ReadingTime database"); | ||
if (TableExists(Constants.TableName)) | ||
{ | ||
Delete.ForeignKey("FK_jcdcdevReadingTime_umbracoNode_uniqueId").OnTable(Constants.TableName).Do(); | ||
Delete.Table(Constants.TableName).Do(); | ||
} | ||
|
||
Create.Table<ReadingTimePoco>().Do(); | ||
|
||
_readingTimeService.ScanAll(); | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
src/jcdcdev.Umbraco.ReadingTime/Infrastructure/Migrations/InitialMigration.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters