Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
升级版本,同时解决升级出现的bug。
Browse files Browse the repository at this point in the history
  • Loading branch information
ltm0203 committed Aug 29, 2017
1 parent 8cca201 commit c853154
Show file tree
Hide file tree
Showing 12 changed files with 1,410 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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)
},
});

}
}
}

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/YoYo.Cms.EntityFramework/YoYo.Cms.EntityFramework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@
<Compile Include="Migrations\201704281345333_YoYoCms_Initial.Designer.cs">
<DependentUpon>201704281345333_YoYoCms_Initial.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201708291553133_Add_Upgrade_ABP2_3.cs" />
<Compile Include="Migrations\201708291553133_Add_Upgrade_ABP2_3.Designer.cs">
<DependentUpon>201708291553133_Add_Upgrade_ABP2_3.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\AbpZeroDbMigrator.cs" />
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="CmsDataModule.cs" />
Expand Down Expand Up @@ -167,6 +171,9 @@
<EmbeddedResource Include="Migrations\201704281345333_YoYoCms_Initial.resx">
<DependentUpon>201704281345333_YoYoCms_Initial.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201708291553133_Add_Upgrade_ABP2_3.resx">
<DependentUpon>201708291553133_Add_Upgrade_ABP2_3.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
Expand Down
Loading

0 comments on commit c853154

Please sign in to comment.