From 1e3c03354724425b4448faf1ee40fd4e702a4a25 Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Fri, 3 Mar 2023 15:55:52 +0530 Subject: [PATCH] shortcircuit for mysql --- server/services/store/sqlstore/data_migrations.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/services/store/sqlstore/data_migrations.go b/server/services/store/sqlstore/data_migrations.go index 8d0a3dad3..15d86129d 100644 --- a/server/services/store/sqlstore/data_migrations.go +++ b/server/services/store/sqlstore/data_migrations.go @@ -793,6 +793,14 @@ func (s *SQLStore) getCollationAndCharset(tableName string) (string, string, err } func (s *SQLStore) RunDeDuplicateCategoryBoardsMigration(currentMigration int) error { + // not supported for SQLite + if s.dbType == model.SqliteDBType { + if mErr := s.setSystemSetting(s.db, DeDuplicateCategoryBoardTableMigrationKey, strconv.FormatBool(true)); mErr != nil { + return fmt.Errorf("cannot mark migration %s as completed: %w", "RunDeDuplicateCategoryBoardsMigration", mErr) + } + return nil + } + setting, err := s.GetSystemSetting(DeDuplicateCategoryBoardTableMigrationKey) if err != nil { return fmt.Errorf("cannot get DeDuplicateCategoryBoardTableMigration state: %w", err)