From 79e578e97ed252bff0dca3c89d81a395b35289d7 Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Mon, 19 Aug 2019 16:09:11 +0800 Subject: Add index for username. --- .../20190819080823_AddIndexForUserName.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Timeline/Migrations/20190819080823_AddIndexForUserName.cs (limited to 'Timeline/Migrations/20190819080823_AddIndexForUserName.cs') 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"); + } + } +} -- cgit v1.2.3