diff options
| author | Michael <[email protected]> | 2017-03-20 16:45:17 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-03-20 16:45:17 -0400 |
| commit | cdc61eb4ea5309769ad4db84d92594e4dc3dff67 (patch) | |
| tree | a8297a7aecc4376f07a497a5e02ab5ff165bfbd3 /Project-Unite/Migrations/201703161854009_app.cs | |
| parent | d9f475e1f33bbf39ca0d79d7a6b0c2fd501b4f2d (diff) | |
| download | project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.gz project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.bz2 project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.zip | |
Initial commit (azure deploy test)
Diffstat (limited to 'Project-Unite/Migrations/201703161854009_app.cs')
| -rw-r--r-- | Project-Unite/Migrations/201703161854009_app.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Project-Unite/Migrations/201703161854009_app.cs b/Project-Unite/Migrations/201703161854009_app.cs new file mode 100644 index 0000000..f10f443 --- /dev/null +++ b/Project-Unite/Migrations/201703161854009_app.cs @@ -0,0 +1,40 @@ +namespace Project_Unite.Migrations +{ + using System; + using System.Data.Entity.Migrations; + + public partial class app : DbMigration + { + public override void Up() + { + //Column names in each table must be unique. Column name 'Parent_Id' in table 'dbo.ACLForumPermissions' is specified more than once. + //Cannot drop the table 'dbo.ACLForumPermissionForumCategories', because it does not exist or you do not have permission. + + + DropForeignKey("dbo.ACLForumPermissionForumCategories", "ACLForumPermission_Id", "dbo.ACLForumPermissions"); + DropForeignKey("dbo.ACLForumPermissionForumCategories", "ForumCategory_Id", "dbo.ForumCategories"); + DropIndex("dbo.ACLForumPermissionForumCategories", new[] { "ACLForumPermission_Id" }); + DropIndex("dbo.ACLForumPermissionForumCategories", new[] { "ForumCategory_Id" }); + } + + public override void Down() + { + CreateTable( + "dbo.ACLForumPermissionForumCategories", + c => new + { + ACLForumPermission_Id = c.String(nullable: false, maxLength: 128), + ForumCategory_Id = c.String(nullable: false, maxLength: 128), + }) + .PrimaryKey(t => new { t.ACLForumPermission_Id, t.ForumCategory_Id }); + + DropForeignKey("dbo.ACLForumPermissions", "Parent_Id", "dbo.ForumCategories"); + DropIndex("dbo.ACLForumPermissions", new[] { "Parent_Id" }); + DropColumn("dbo.ACLForumPermissions", "Parent_Id"); + CreateIndex("dbo.ACLForumPermissionForumCategories", "ForumCategory_Id"); + CreateIndex("dbo.ACLForumPermissionForumCategories", "ACLForumPermission_Id"); + AddForeignKey("dbo.ACLForumPermissionForumCategories", "ForumCategory_Id", "dbo.ForumCategories", "Id", cascadeDelete: true); + AddForeignKey("dbo.ACLForumPermissionForumCategories", "ACLForumPermission_Id", "dbo.ACLForumPermissions", "Id", cascadeDelete: true); + } + } +} |
