Skip to content

Commit

Permalink
Migrations to initial create
Browse files Browse the repository at this point in the history
  • Loading branch information
Devqon committed Oct 13, 2015
1 parent f819707 commit a4f67a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
33 changes: 1 addition & 32 deletions Migrations/NotificationsMigrations.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using DQ.Scheduling.Models;
using Orchard.ContentManagement.MetaData;
using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;
using Orchard.Environment.Extensions;

Expand Down Expand Up @@ -42,37 +41,7 @@ public int Create() {
.WithPart(typeof(NotificationsSubscriptionPart).Name)
);

return 4;
}

public int UpdateFrom1() {

// NotificationsPlanPartRecord
SchemaBuilder.CreateTable(typeof(NotificationsPlanPartRecord).Name, table => table
.ContentPartRecord()
.Column<string>("UpcomingNotificationInterval")
.Column<int>("UpcomingNotificationIntervalCount")
.Column<string>("FollowUpNotificationInterval")
.Column<int>("FollowUpNotificationIntervalCount")
);

return 2;
}

public int UpdateFrom2() {

ContentDefinitionManager.AlterPartDefinition(typeof(NotificationsPlanPart).Name, part => part
.Attachable());

return 3;
}

public int UpdateFrom3() {

SchemaBuilder.AlterTable(typeof(NotificationsPartRecord).Name, table => table
.AddColumn<int>("NotificationsPlanPartRecord_Id"));

return 4;
return 1;
}
}
}
1 change: 1 addition & 0 deletions Views/Parts/Calendar.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@using DQ.Scheduling.ViewModels
@{
IEnumerable<CalendarDefaultDisplayViewModel> events = Model.CalendarEvents;
events = events.OrderBy(e => e.Start);
}

<ul>
Expand Down

0 comments on commit a4f67a6

Please sign in to comment.