aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Migrations/20190820155354_MakeUserNameIndexUnique.Designer.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-20 23:57:47 +0800
committerGitHub <noreply@github.com>2019-08-20 23:57:47 +0800
commita585c6e35829e9f2b4b0b8ce8c6b395e5ea84f2c (patch)
tree3d20f696dd097b86eeba497baf8dc1baf966626c /Timeline/Migrations/20190820155354_MakeUserNameIndexUnique.Designer.cs
parent4af6c82f34dd79d7a1ca348f167e01570951e3ad (diff)
parentf657105462b7a8c528b39005d81ffe6141f476a5 (diff)
downloadtimeline-a585c6e35829e9f2b4b0b8ce8c6b395e5ea84f2c.tar.gz
timeline-a585c6e35829e9f2b4b0b8ce8c6b395e5ea84f2c.tar.bz2
timeline-a585c6e35829e9f2b4b0b8ce8c6b395e5ea84f2c.zip
Merge pull request #47 from crupest/avatar-enhance
Use etag for avatar cache.
Diffstat (limited to 'Timeline/Migrations/20190820155354_MakeUserNameIndexUnique.Designer.cs')
-rw-r--r--Timeline/Migrations/20190820155354_MakeUserNameIndexUnique.Designer.cs93
1 files changed, 93 insertions, 0 deletions
diff --git a/Timeline/Migrations/20190820155354_MakeUserNameIndexUnique.Designer.cs b/Timeline/Migrations/20190820155354_MakeUserNameIndexUnique.Designer.cs
new file mode 100644
index 00000000..420cd41c
--- /dev/null
+++ b/Timeline/Migrations/20190820155354_MakeUserNameIndexUnique.Designer.cs
@@ -0,0 +1,93 @@
+// <auto-generated />
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Timeline.Entities;
+
+namespace Timeline.Migrations
+{
+ [DbContext(typeof(DatabaseContext))]
+ [Migration("20190820155354_MakeUserNameIndexUnique")]
+ partial class MakeUserNameIndexUnique
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("Timeline.Entities.User", b =>
+ {
+ b.Property<long>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("id");
+
+ b.Property<string>("EncryptedPassword")
+ .IsRequired()
+ .HasColumnName("password");
+
+ b.Property<string>("Name")
+ .IsRequired()
+ .HasColumnName("name")
+ .HasMaxLength(26);
+
+ b.Property<string>("RoleString")
+ .IsRequired()
+ .HasColumnName("roles");
+
+ b.Property<long>("Version")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("version")
+ .HasDefaultValue(0L);
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("users");
+ });
+
+ modelBuilder.Entity("Timeline.Entities.UserAvatar", b =>
+ {
+ b.Property<long>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("id");
+
+ b.Property<byte[]>("Data")
+ .HasColumnName("data");
+
+ b.Property<string>("ETag")
+ .HasColumnName("etag")
+ .HasMaxLength(30);
+
+ b.Property<DateTime>("LastModified")
+ .HasColumnName("last_modified");
+
+ b.Property<string>("Type")
+ .HasColumnName("type");
+
+ b.Property<long>("UserId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId")
+ .IsUnique();
+
+ b.ToTable("user_avatars");
+ });
+
+ modelBuilder.Entity("Timeline.Entities.UserAvatar", b =>
+ {
+ b.HasOne("Timeline.Entities.User")
+ .WithOne("Avatar")
+ .HasForeignKey("Timeline.Entities.UserAvatar", "UserId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}