This repository has been archived by the owner on May 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
1,410 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/YoYo.Cms.EntityFramework/Migrations/201708291553133_Add_Upgrade_ABP2_3.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
62 changes: 62 additions & 0 deletions
62
src/YoYo.Cms.EntityFramework/Migrations/201708291553133_Add_Upgrade_ABP2_3.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,62 @@ | ||
namespace YoYo.Cms.Migrations | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Data.Entity.Infrastructure.Annotations; | ||
using System.Data.Entity.Migrations; | ||
|
||
public partial class Add_Upgrade_ABP2_3 : DbMigration | ||
{ | ||
public override void Up() | ||
{ | ||
AlterTableAnnotations( | ||
"ABP.UserOrganizationUnits", | ||
c => new | ||
{ | ||
Id = c.Long(nullable: false, identity: true), | ||
TenantId = c.Int(), | ||
UserId = c.Long(nullable: false), | ||
OrganizationUnitId = c.Long(nullable: false), | ||
IsDeleted = c.Boolean(nullable: false), | ||
CreationTime = c.DateTime(nullable: false), | ||
CreatorUserId = c.Long(), | ||
}, | ||
annotations: new Dictionary<string, AnnotationValues> | ||
{ | ||
{ | ||
"DynamicFilter_UserOrganizationUnit_SoftDelete", | ||
new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") | ||
}, | ||
}); | ||
|
||
AddColumn("ABP.Languages", "IsDisabled", c => c.Boolean(nullable: false)); | ||
AddColumn("ABP.UserOrganizationUnits", "IsDeleted", c => c.Boolean(nullable: false)); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
DropColumn("ABP.UserOrganizationUnits", "IsDeleted"); | ||
DropColumn("ABP.Languages", "IsDisabled"); | ||
AlterTableAnnotations( | ||
"ABP.UserOrganizationUnits", | ||
c => new | ||
{ | ||
Id = c.Long(nullable: false, identity: true), | ||
TenantId = c.Int(), | ||
UserId = c.Long(nullable: false), | ||
OrganizationUnitId = c.Long(nullable: false), | ||
IsDeleted = c.Boolean(nullable: false), | ||
CreationTime = c.DateTime(nullable: false), | ||
CreatorUserId = c.Long(), | ||
}, | ||
annotations: new Dictionary<string, AnnotationValues> | ||
{ | ||
{ | ||
"DynamicFilter_UserOrganizationUnit_SoftDelete", | ||
new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) | ||
}, | ||
}); | ||
|
||
} | ||
} | ||
} |
126 changes: 126 additions & 0 deletions
126
src/YoYo.Cms.EntityFramework/Migrations/201708291553133_Add_Upgrade_ABP2_3.resx
Large diffs are not rendered by default.
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
Oops, something went wrong.