summaryrefslogtreecommitdiff
path: root/Project-Unite/Migrations/201703151602344_InitialCreate.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-20 16:45:17 -0400
committerMichael <[email protected]>2017-03-20 16:45:17 -0400
commitcdc61eb4ea5309769ad4db84d92594e4dc3dff67 (patch)
treea8297a7aecc4376f07a497a5e02ab5ff165bfbd3 /Project-Unite/Migrations/201703151602344_InitialCreate.cs
parentd9f475e1f33bbf39ca0d79d7a6b0c2fd501b4f2d (diff)
downloadproject-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.gz
project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.bz2
project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.zip
Initial commit (azure deploy test)
Diffstat (limited to 'Project-Unite/Migrations/201703151602344_InitialCreate.cs')
-rw-r--r--Project-Unite/Migrations/201703151602344_InitialCreate.cs108
1 files changed, 108 insertions, 0 deletions
diff --git a/Project-Unite/Migrations/201703151602344_InitialCreate.cs b/Project-Unite/Migrations/201703151602344_InitialCreate.cs
new file mode 100644
index 0000000..4baa1ed
--- /dev/null
+++ b/Project-Unite/Migrations/201703151602344_InitialCreate.cs
@@ -0,0 +1,108 @@
+namespace Project_Unite.Migrations
+{
+ using System;
+ using System.Data.Entity.Migrations;
+
+ public partial class InitialCreate : DbMigration
+ {
+ public override void Up()
+ {
+ CreateTable(
+ "dbo.AspNetRoles",
+ c => new
+ {
+ Id = c.String(nullable: false, maxLength: 128),
+ Name = c.String(nullable: false, maxLength: 256),
+ })
+ .PrimaryKey(t => t.Id)
+ .Index(t => t.Name, unique: true, name: "RoleNameIndex");
+
+ CreateTable(
+ "dbo.AspNetUserRoles",
+ c => new
+ {
+ UserId = c.String(nullable: false, maxLength: 128),
+ RoleId = c.String(nullable: false, maxLength: 128),
+ })
+ .PrimaryKey(t => new { t.UserId, t.RoleId })
+ .ForeignKey("dbo.AspNetRoles", t => t.RoleId, cascadeDelete: true)
+ .ForeignKey("dbo.AspNetUsers", t => t.UserId, cascadeDelete: true)
+ .Index(t => t.UserId)
+ .Index(t => t.RoleId);
+
+ CreateTable(
+ "dbo.AspNetUsers",
+ c => new
+ {
+ Id = c.String(nullable: false, maxLength: 128),
+ Codepoints = c.Long(nullable: false),
+ Bio = c.String(),
+ BannerUrl = c.String(),
+ AvatarUrl = c.String(),
+ DisplayName = c.String(),
+ FullName = c.String(),
+ Website = c.String(),
+ YoutubeUrl = c.String(),
+ SystemName = c.String(),
+ Email = c.String(maxLength: 256),
+ EmailConfirmed = c.Boolean(nullable: false),
+ PasswordHash = c.String(),
+ SecurityStamp = c.String(),
+ PhoneNumber = c.String(),
+ PhoneNumberConfirmed = c.Boolean(nullable: false),
+ TwoFactorEnabled = c.Boolean(nullable: false),
+ LockoutEndDateUtc = c.DateTime(),
+ LockoutEnabled = c.Boolean(nullable: false),
+ AccessFailedCount = c.Int(nullable: false),
+ UserName = c.String(nullable: false, maxLength: 256),
+ })
+ .PrimaryKey(t => t.Id)
+ .Index(t => t.UserName, unique: true, name: "UserNameIndex");
+
+ CreateTable(
+ "dbo.AspNetUserClaims",
+ c => new
+ {
+ Id = c.Int(nullable: false, identity: true),
+ UserId = c.String(nullable: false, maxLength: 128),
+ ClaimType = c.String(),
+ ClaimValue = c.String(),
+ })
+ .PrimaryKey(t => t.Id)
+ .ForeignKey("dbo.AspNetUsers", t => t.UserId, cascadeDelete: true)
+ .Index(t => t.UserId);
+
+ CreateTable(
+ "dbo.AspNetUserLogins",
+ c => new
+ {
+ LoginProvider = c.String(nullable: false, maxLength: 128),
+ ProviderKey = c.String(nullable: false, maxLength: 128),
+ UserId = c.String(nullable: false, maxLength: 128),
+ })
+ .PrimaryKey(t => new { t.LoginProvider, t.ProviderKey, t.UserId })
+ .ForeignKey("dbo.AspNetUsers", t => t.UserId, cascadeDelete: true)
+ .Index(t => t.UserId);
+
+ }
+
+ public override void Down()
+ {
+ DropForeignKey("dbo.AspNetUserRoles", "UserId", "dbo.AspNetUsers");
+ DropForeignKey("dbo.AspNetUserLogins", "UserId", "dbo.AspNetUsers");
+ DropForeignKey("dbo.AspNetUserClaims", "UserId", "dbo.AspNetUsers");
+ DropForeignKey("dbo.AspNetUserRoles", "RoleId", "dbo.AspNetRoles");
+ DropIndex("dbo.AspNetUserLogins", new[] { "UserId" });
+ DropIndex("dbo.AspNetUserClaims", new[] { "UserId" });
+ DropIndex("dbo.AspNetUsers", "UserNameIndex");
+ DropIndex("dbo.AspNetUserRoles", new[] { "RoleId" });
+ DropIndex("dbo.AspNetUserRoles", new[] { "UserId" });
+ DropIndex("dbo.AspNetRoles", "RoleNameIndex");
+ DropTable("dbo.AspNetUserLogins");
+ DropTable("dbo.AspNetUserClaims");
+ DropTable("dbo.AspNetUsers");
+ DropTable("dbo.AspNetUserRoles");
+ DropTable("dbo.AspNetRoles");
+ }
+ }
+}