From 34f62a6bedd3f090ab40e040236af1e6a86c32d7 Mon Sep 17 00:00:00 2001 From: biss Date: Tue, 11 Aug 2026 15:08:52 +0800 Subject: [PATCH] =?UTF-8?q?SQLite=20=E8=BF=81=E7=A7=BB=E9=93=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Persistence/DevelopmentSqliteMigrator.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Jiaowu.Api/Infrastructure/Persistence/DevelopmentSqliteMigrator.cs b/src/Jiaowu.Api/Infrastructure/Persistence/DevelopmentSqliteMigrator.cs index 8942884..6f74098 100644 --- a/src/Jiaowu.Api/Infrastructure/Persistence/DevelopmentSqliteMigrator.cs +++ b/src/Jiaowu.Api/Infrastructure/Persistence/DevelopmentSqliteMigrator.cs @@ -3013,11 +3013,11 @@ public sealed class DevelopmentSqliteMigrator( private static readonly string[] NotificationInboxIndexesStatements = [ - """DROP INDEX "IX_Notifications_UserId_IsRead";""", - """DROP INDEX "IX_Notifications_UserId_Category_CreatedAt";""", - """CREATE INDEX "IX_Notifications_UserId_CreatedAt_Id" ON "Notifications" ("UserId", "CreatedAt", "Id");""", - """CREATE INDEX "IX_Notifications_UserId_IsRead_CreatedAt_Id" ON "Notifications" ("UserId", "IsRead", "CreatedAt", "Id");""", - """CREATE INDEX "IX_Notifications_UserId_Category_CreatedAt_Id" ON "Notifications" ("UserId", "Category", "CreatedAt", "Id");""" + """DROP INDEX IF EXISTS "IX_Notifications_UserId_IsRead";""", + """DROP INDEX IF EXISTS "IX_Notifications_UserId_Category_CreatedAt";""", + """CREATE INDEX IF NOT EXISTS "IX_Notifications_UserId_CreatedAt_Id" ON "Notifications" ("UserId", "CreatedAt", "Id");""", + """CREATE INDEX IF NOT EXISTS "IX_Notifications_UserId_IsRead_CreatedAt_Id" ON "Notifications" ("UserId", "IsRead", "CreatedAt", "Id");""", + """CREATE INDEX IF NOT EXISTS "IX_Notifications_UserId_Category_CreatedAt_Id" ON "Notifications" ("UserId", "Category", "CreatedAt", "Id");""" ]; private static readonly string[] ExperimentCourseGradesStatements =