| @@ -1,277 +0,0 @@ | |||
| // <auto-generated /> | |||
| using System; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using Microsoft.EntityFrameworkCore.Infrastructure; | |||
| using Microsoft.EntityFrameworkCore.Metadata; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |||
| using SecureSharing.Data.DbContexts; | |||
| namespace SecureSharing.Data.Migrations | |||
| { | |||
| [DbContext(typeof(AppDbContext))] | |||
| [Migration("20220906133332_init")] | |||
| partial class init | |||
| { | |||
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
| { | |||
| #pragma warning disable 612, 618 | |||
| modelBuilder | |||
| .HasAnnotation("Relational:MaxIdentifierLength", 128) | |||
| .HasAnnotation("ProductVersion", "5.0.7") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedName") | |||
| .IsUnique() | |||
| .HasDatabaseName("RoleNameIndex") | |||
| .HasFilter("[NormalizedName] IS NOT NULL"); | |||
| b.ToTable("AspNetRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("RoleId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetRoleClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<int>("AccessFailedCount") | |||
| .HasColumnType("int"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Email") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<bool>("EmailConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<bool>("LockoutEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<DateTimeOffset?>("LockoutEnd") | |||
| .HasColumnType("datetimeoffset"); | |||
| b.Property<string>("NormalizedEmail") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedUserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("PasswordHash") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("PhoneNumber") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("PhoneNumberConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("SecurityStamp") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("TwoFactorEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("UserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedEmail") | |||
| .HasDatabaseName("EmailIndex"); | |||
| b.HasIndex("NormalizedUserName") | |||
| .IsUnique() | |||
| .HasDatabaseName("UserNameIndex") | |||
| .HasFilter("[NormalizedUserName] IS NOT NULL"); | |||
| b.ToTable("AspNetUsers"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderKey") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderDisplayName") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("LoginProvider", "ProviderKey"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserLogins"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("RoleId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("UserId", "RoleId"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetUserRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Value") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("UserId", "LoginProvider", "Name"); | |||
| b.ToTable("AspNetUserTokens"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| #pragma warning restore 612, 618 | |||
| } | |||
| } | |||
| } | |||
| @@ -1,292 +0,0 @@ | |||
| // <auto-generated /> | |||
| using System; | |||
| using SecureSharing.Data.DbContexts; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using Microsoft.EntityFrameworkCore.Infrastructure; | |||
| using Microsoft.EntityFrameworkCore.Metadata; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |||
| namespace SecureSharing.Data.Migrations | |||
| { | |||
| [DbContext(typeof(AppDbContext))] | |||
| [Migration("20220908115806_AddMessagesTable")] | |||
| partial class AddMessagesTable | |||
| { | |||
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
| { | |||
| #pragma warning disable 612, 618 | |||
| modelBuilder | |||
| .HasAnnotation("Relational:MaxIdentifierLength", 128) | |||
| .HasAnnotation("ProductVersion", "5.0.7") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| modelBuilder.Entity("SecureSharing.Data.Data.Message", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("Text") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("Id"); | |||
| b.ToTable("Messages"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedName") | |||
| .IsUnique() | |||
| .HasDatabaseName("RoleNameIndex") | |||
| .HasFilter("[NormalizedName] IS NOT NULL"); | |||
| b.ToTable("AspNetRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("RoleId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetRoleClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<int>("AccessFailedCount") | |||
| .HasColumnType("int"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Email") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<bool>("EmailConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<bool>("LockoutEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<DateTimeOffset?>("LockoutEnd") | |||
| .HasColumnType("datetimeoffset"); | |||
| b.Property<string>("NormalizedEmail") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedUserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("PasswordHash") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("PhoneNumber") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("PhoneNumberConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("SecurityStamp") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("TwoFactorEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("UserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedEmail") | |||
| .HasDatabaseName("EmailIndex"); | |||
| b.HasIndex("NormalizedUserName") | |||
| .IsUnique() | |||
| .HasDatabaseName("UserNameIndex") | |||
| .HasFilter("[NormalizedUserName] IS NOT NULL"); | |||
| b.ToTable("AspNetUsers"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderKey") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderDisplayName") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("LoginProvider", "ProviderKey"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserLogins"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("RoleId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("UserId", "RoleId"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetUserRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Value") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("UserId", "LoginProvider", "Name"); | |||
| b.ToTable("AspNetUserTokens"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| #pragma warning restore 612, 618 | |||
| } | |||
| } | |||
| } | |||
| @@ -1,29 +0,0 @@ | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| namespace SecureSharing.Data.Migrations | |||
| { | |||
| public partial class AddMessagesTable : Migration | |||
| { | |||
| protected override void Up(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.CreateTable( | |||
| name: "Messages", | |||
| columns: table => new | |||
| { | |||
| Id = table.Column<int>(type: "int", nullable: false) | |||
| .Annotation("SqlServer:Identity", "1, 1"), | |||
| Text = table.Column<string>(type: "nvarchar(max)", nullable: true) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_Messages", x => x.Id); | |||
| }); | |||
| } | |||
| protected override void Down(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.DropTable( | |||
| name: "Messages"); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,298 +0,0 @@ | |||
| // <auto-generated /> | |||
| using System; | |||
| using SecureSharing.Data.DbContexts; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using Microsoft.EntityFrameworkCore.Infrastructure; | |||
| using Microsoft.EntityFrameworkCore.Metadata; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |||
| namespace SecureSharing.Data.Migrations | |||
| { | |||
| [DbContext(typeof(AppDbContext))] | |||
| [Migration("20220909105407_MessageExpiryDate")] | |||
| partial class MessageExpiryDate | |||
| { | |||
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
| { | |||
| #pragma warning disable 612, 618 | |||
| modelBuilder | |||
| .HasAnnotation("Relational:MaxIdentifierLength", 128) | |||
| .HasAnnotation("ProductVersion", "5.0.7") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| modelBuilder.Entity("SecureSharing.Data.Data.Message", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<DateTime?>("ExpiryDate") | |||
| .HasColumnType("datetime2"); | |||
| b.Property<bool>("IsValid") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("Text") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("Id"); | |||
| b.ToTable("Messages"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedName") | |||
| .IsUnique() | |||
| .HasDatabaseName("RoleNameIndex") | |||
| .HasFilter("[NormalizedName] IS NOT NULL"); | |||
| b.ToTable("AspNetRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("RoleId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetRoleClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<int>("AccessFailedCount") | |||
| .HasColumnType("int"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Email") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<bool>("EmailConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<bool>("LockoutEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<DateTimeOffset?>("LockoutEnd") | |||
| .HasColumnType("datetimeoffset"); | |||
| b.Property<string>("NormalizedEmail") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedUserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("PasswordHash") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("PhoneNumber") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("PhoneNumberConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("SecurityStamp") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("TwoFactorEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("UserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedEmail") | |||
| .HasDatabaseName("EmailIndex"); | |||
| b.HasIndex("NormalizedUserName") | |||
| .IsUnique() | |||
| .HasDatabaseName("UserNameIndex") | |||
| .HasFilter("[NormalizedUserName] IS NOT NULL"); | |||
| b.ToTable("AspNetUsers"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderKey") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderDisplayName") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("LoginProvider", "ProviderKey"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserLogins"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("RoleId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("UserId", "RoleId"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetUserRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Value") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("UserId", "LoginProvider", "Name"); | |||
| b.ToTable("AspNetUserTokens"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| #pragma warning restore 612, 618 | |||
| } | |||
| } | |||
| } | |||
| @@ -1,35 +0,0 @@ | |||
| using System; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| namespace SecureSharing.Data.Migrations | |||
| { | |||
| public partial class MessageExpiryDate : Migration | |||
| { | |||
| protected override void Up(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.AddColumn<DateTime>( | |||
| name: "ExpiryDate", | |||
| table: "Messages", | |||
| type: "datetime2", | |||
| nullable: true); | |||
| migrationBuilder.AddColumn<bool>( | |||
| name: "IsValid", | |||
| table: "Messages", | |||
| type: "bit", | |||
| nullable: false, | |||
| defaultValue: false); | |||
| } | |||
| protected override void Down(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.DropColumn( | |||
| name: "ExpiryDate", | |||
| table: "Messages"); | |||
| migrationBuilder.DropColumn( | |||
| name: "IsValid", | |||
| table: "Messages"); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,310 +0,0 @@ | |||
| // <auto-generated /> | |||
| using System; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using Microsoft.EntityFrameworkCore.Infrastructure; | |||
| using Microsoft.EntityFrameworkCore.Metadata; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |||
| using SecureSharing.Data.DbContexts; | |||
| #nullable disable | |||
| namespace SecureSharing.Data.Migrations | |||
| { | |||
| [DbContext(typeof(AppDbContext))] | |||
| [Migration("20220927104345_AddingFileNameAndCode")] | |||
| partial class AddingFileNameAndCode | |||
| { | |||
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
| { | |||
| #pragma warning disable 612, 618 | |||
| modelBuilder | |||
| .HasAnnotation("ProductVersion", "6.0.9") | |||
| .HasAnnotation("Relational:MaxIdentifierLength", 128); | |||
| SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedName") | |||
| .IsUnique() | |||
| .HasDatabaseName("RoleNameIndex") | |||
| .HasFilter("[NormalizedName] IS NOT NULL"); | |||
| b.ToTable("AspNetRoles", (string)null); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int"); | |||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("RoleId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetRoleClaims", (string)null); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<int>("AccessFailedCount") | |||
| .HasColumnType("int"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Email") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<bool>("EmailConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<bool>("LockoutEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<DateTimeOffset?>("LockoutEnd") | |||
| .HasColumnType("datetimeoffset"); | |||
| b.Property<string>("NormalizedEmail") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedUserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("PasswordHash") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("PhoneNumber") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("PhoneNumberConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("SecurityStamp") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("TwoFactorEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("UserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedEmail") | |||
| .HasDatabaseName("EmailIndex"); | |||
| b.HasIndex("NormalizedUserName") | |||
| .IsUnique() | |||
| .HasDatabaseName("UserNameIndex") | |||
| .HasFilter("[NormalizedUserName] IS NOT NULL"); | |||
| b.ToTable("AspNetUsers", (string)null); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int"); | |||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserClaims", (string)null); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderKey") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderDisplayName") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("LoginProvider", "ProviderKey"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserLogins", (string)null); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("RoleId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("UserId", "RoleId"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetUserRoles", (string)null); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Value") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("UserId", "LoginProvider", "Name"); | |||
| b.ToTable("AspNetUserTokens", (string)null); | |||
| }); | |||
| modelBuilder.Entity("SecureSharing.Data.Data.Message", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int"); | |||
| SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); | |||
| b.Property<string>("Code") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<DateTime?>("ExpiryDate") | |||
| .HasColumnType("datetime2"); | |||
| b.Property<string>("FileName") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("IsValid") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("Text") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("Id"); | |||
| b.ToTable("Messages"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| #pragma warning restore 612, 618 | |||
| } | |||
| } | |||
| } | |||
| @@ -1,35 +0,0 @@ | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| #nullable disable | |||
| namespace SecureSharing.Data.Migrations | |||
| { | |||
| public partial class AddingFileNameAndCode : Migration | |||
| { | |||
| protected override void Up(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.AddColumn<string>( | |||
| name: "Code", | |||
| table: "Messages", | |||
| type: "nvarchar(max)", | |||
| nullable: true); | |||
| migrationBuilder.AddColumn<string>( | |||
| name: "FileName", | |||
| table: "Messages", | |||
| type: "nvarchar(max)", | |||
| nullable: true); | |||
| } | |||
| protected override void Down(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.DropColumn( | |||
| name: "Code", | |||
| table: "Messages"); | |||
| migrationBuilder.DropColumn( | |||
| name: "FileName", | |||
| table: "Messages"); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,32 +0,0 @@ | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| #nullable disable | |||
| namespace SecureSharing.Data.Migrations | |||
| { | |||
| public partial class ChangedforfilenametobelistofFileModels : Migration | |||
| { | |||
| protected override void Up(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.DropTable(name: "FileModel"); | |||
| migrationBuilder.CreateTable( | |||
| name: "FileModel", | |||
| columns: table => new | |||
| { | |||
| Id = table.Column<int>(type: "int", nullable: false) | |||
| .Annotation("SqlServer:Identity", "1, 1"), | |||
| Name = table.Column<string>(type: "nvarchar(max)", nullable: true) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_FileModel", x => x.Id); | |||
| }); | |||
| } | |||
| protected override void Down(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.DropTable(name: "FileModel"); | |||
| } | |||
| } | |||
| } | |||
| @@ -12,8 +12,8 @@ using SecureSharing.Data.DbContexts; | |||
| namespace SecureSharing.Data.Migrations | |||
| { | |||
| [DbContext(typeof(AppDbContext))] | |||
| [Migration("20220928065754_Changed for filename to be list of FileModels")] | |||
| partial class ChangedforfilenametobelistofFileModels | |||
| [Migration("20220928085731_Init")] | |||
| partial class Init | |||
| { | |||
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
| { | |||
| @@ -1,9 +1,11 @@ | |||
| using System; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| #nullable disable | |||
| namespace SecureSharing.Data.Migrations | |||
| { | |||
| public partial class init : Migration | |||
| public partial class Init : Migration | |||
| { | |||
| protected override void Up(MigrationBuilder migrationBuilder) | |||
| { | |||
| @@ -46,6 +48,22 @@ namespace SecureSharing.Data.Migrations | |||
| table.PrimaryKey("PK_AspNetUsers", x => x.Id); | |||
| }); | |||
| migrationBuilder.CreateTable( | |||
| name: "Messages", | |||
| columns: table => new | |||
| { | |||
| Id = table.Column<int>(type: "int", nullable: false) | |||
| .Annotation("SqlServer:Identity", "1, 1"), | |||
| Text = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
| Code = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
| IsValid = table.Column<bool>(type: "bit", nullable: false), | |||
| ExpiryDate = table.Column<DateTime>(type: "datetime2", nullable: true) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_Messages", x => x.Id); | |||
| }); | |||
| migrationBuilder.CreateTable( | |||
| name: "AspNetRoleClaims", | |||
| columns: table => new | |||
| @@ -152,6 +170,25 @@ namespace SecureSharing.Data.Migrations | |||
| onDelete: ReferentialAction.Cascade); | |||
| }); | |||
| migrationBuilder.CreateTable( | |||
| name: "FileModel", | |||
| columns: table => new | |||
| { | |||
| Id = table.Column<int>(type: "int", nullable: false) | |||
| .Annotation("SqlServer:Identity", "1, 1"), | |||
| Name = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
| MessageId = table.Column<int>(type: "int", nullable: true) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_FileModel", x => x.Id); | |||
| table.ForeignKey( | |||
| name: "FK_FileModel_Messages_MessageId", | |||
| column: x => x.MessageId, | |||
| principalTable: "Messages", | |||
| principalColumn: "Id"); | |||
| }); | |||
| migrationBuilder.CreateIndex( | |||
| name: "IX_AspNetRoleClaims_RoleId", | |||
| table: "AspNetRoleClaims", | |||
| @@ -190,6 +227,11 @@ namespace SecureSharing.Data.Migrations | |||
| column: "NormalizedUserName", | |||
| unique: true, | |||
| filter: "[NormalizedUserName] IS NOT NULL"); | |||
| migrationBuilder.CreateIndex( | |||
| name: "IX_FileModel_MessageId", | |||
| table: "FileModel", | |||
| column: "MessageId"); | |||
| } | |||
| protected override void Down(MigrationBuilder migrationBuilder) | |||
| @@ -209,11 +251,17 @@ namespace SecureSharing.Data.Migrations | |||
| migrationBuilder.DropTable( | |||
| name: "AspNetUserTokens"); | |||
| migrationBuilder.DropTable( | |||
| name: "FileModel"); | |||
| migrationBuilder.DropTable( | |||
| name: "AspNetRoles"); | |||
| migrationBuilder.DropTable( | |||
| name: "AspNetUsers"); | |||
| migrationBuilder.DropTable( | |||
| name: "Messages"); | |||
| } | |||
| } | |||
| } | |||
| @@ -21,4 +21,8 @@ | |||
| <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Folder Include="Migrations" /> | |||
| </ItemGroup> | |||
| </Project> | |||
| @@ -1,7 +1,7 @@ | |||
| { | |||
| "AllowedHosts": "*", | |||
| "ConnectionStrings": { | |||
| "DefaultConnection": "data source=(localdb)\\MSSQLLocalDB; initial catalog=Test;Integrated Security=True" | |||
| "DefaultConnection": "data source=192.168.88.175,1433;initial catalog=SecureShareIDEMOOO;User Id=sa;Password=Diligent123!" | |||
| }, | |||
| "Logging": { | |||
| "LogLevel": { | |||
| @@ -1,3 +0,0 @@ | |||
| <StaticWebAssets Version="1.0"> | |||
| <ContentRoot BasePath="/Identity" Path="C:\Users\julija.stojkovic\.nuget\packages\microsoft.aspnetcore.identity.ui\5.0.6\staticwebassets\V4\" /> | |||
| </StaticWebAssets> | |||
| @@ -1,8 +0,0 @@ | |||
| { | |||
| "runtimeOptions": { | |||
| "additionalProbingPaths": [ | |||
| "C:\\Users\\julija.stojkovic\\.dotnet\\store\\|arch|\\|tfm|", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages" | |||
| ] | |||
| } | |||
| } | |||
| @@ -1,13 +0,0 @@ | |||
| { | |||
| "runtimeOptions": { | |||
| "tfm": "net5.0", | |||
| "framework": { | |||
| "name": "Microsoft.AspNetCore.App", | |||
| "version": "5.0.0" | |||
| }, | |||
| "configProperties": { | |||
| "System.GC.Server": true, | |||
| "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false | |||
| } | |||
| } | |||
| } | |||
| @@ -1,3 +0,0 @@ | |||
| <StaticWebAssets Version="1.0"> | |||
| <ContentRoot BasePath="/Identity" Path="C:\Users\julija.stojkovic\.nuget\packages\microsoft.aspnetcore.identity.ui\5.0.6\staticwebassets\V4\" /> | |||
| </StaticWebAssets> | |||
| @@ -1,8 +0,0 @@ | |||
| { | |||
| "runtimeOptions": { | |||
| "additionalProbingPaths": [ | |||
| "C:\\Users\\julija.stojkovic\\.dotnet\\store\\|arch|\\|tfm|", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages" | |||
| ] | |||
| } | |||
| } | |||
| @@ -1,13 +0,0 @@ | |||
| { | |||
| "runtimeOptions": { | |||
| "tfm": "net5.0", | |||
| "framework": { | |||
| "name": "Microsoft.AspNetCore.App", | |||
| "version": "5.0.0" | |||
| }, | |||
| "configProperties": { | |||
| "System.GC.Server": true, | |||
| "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false | |||
| } | |||
| } | |||
| } | |||