aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Migrations/20190819080823_AddIndexForUserName.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-19 16:09:11 +0800
committer杨宇千 <crupest@outlook.com>2019-08-19 16:09:11 +0800
commit79e578e97ed252bff0dca3c89d81a395b35289d7 (patch)
treebd8c0d70aac7cd4d1a6c28ae7c9b7c681dbd5613 /Timeline/Migrations/20190819080823_AddIndexForUserName.cs
parentfdca6a03fe4733c739a724a902fa9fe0b0b55edc (diff)
downloadtimeline-79e578e97ed252bff0dca3c89d81a395b35289d7.tar.gz
timeline-79e578e97ed252bff0dca3c89d81a395b35289d7.tar.bz2
timeline-79e578e97ed252bff0dca3c89d81a395b35289d7.zip
Add index for username.
Diffstat (limited to 'Timeline/Migrations/20190819080823_AddIndexForUserName.cs')
-rw-r--r--Timeline/Migrations/20190819080823_AddIndexForUserName.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/Timeline/Migrations/20190819080823_AddIndexForUserName.cs b/Timeline/Migrations/20190819080823_AddIndexForUserName.cs
new file mode 100644
index 00000000..b910a174
--- /dev/null
+++ b/Timeline/Migrations/20190819080823_AddIndexForUserName.cs
@@ -0,0 +1,22 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace Timeline.Migrations
+{
+ public partial class AddIndexForUserName : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateIndex(
+ name: "IX_users_name",
+ table: "users",
+ column: "name");
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropIndex(
+ name: "IX_users_name",
+ table: "users");
+ }
+ }
+}