Fix AddEasyDutch migration: handle existing data with idempotent operations#5454
Fix AddEasyDutch migration: handle existing data with idempotent operations#5454collinbarrett merged 3 commits intomainfrom
Conversation
|
@copilot , here were the logs if it helps: Connected! 2026-02-01T21:41:00.5351693Z ClientConnectionId:cd9d0433-13b2-4899-9f76-ecbec475ead2 2026-02-01T21:41:00.5351719Z Error Number:2601,State:1,Class:14 2026-02-01T21:41:00.5351749Z ClientConnectionId before routing:661fdceb-f3b2-47d3-b400-9f5b4201a46a 2026-02-01T21:41:00.5366932Z Routing Destination:ab8b0e8d9d25.tr29804.eastus2-a.worker.database.windows.net,11021 2026-02-01T21:45:37.7082556Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:45:37.7083135Z Executed DbCommand (30ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:45:37.7083173Z SELECT 1 2026-02-01T21:45:37.7384879Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:45:37.7385299Z Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:45:37.7385337Z SELECT 1 2026-02-01T21:45:37.7659723Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:45:37.7660316Z Executed DbCommand (23ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:45:37.7660414Z SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); |
Co-authored-by: collinbarrett <6483057+collinbarrett@users.noreply.github.com>
Co-authored-by: collinbarrett <6483057+collinbarrett@users.noreply.github.com>
The duplicate key error occurred because PR #5450's data was already in the database when the migration tried to insert it. Fixed in commit 47fb114 by making the migration idempotent - it now uses |
|
@copilot double-check your fix will full resolve all errors in these logs: Connected! 2026-02-01T21:41:00.5351693Z ClientConnectionId:cd9d0433-13b2-4899-9f76-ecbec475ead2 2026-02-01T21:41:00.5351719Z Error Number:2601,State:1,Class:14 2026-02-01T21:41:00.5351749Z ClientConnectionId before routing:661fdceb-f3b2-47d3-b400-9f5b4201a46a 2026-02-01T21:41:00.5366932Z Routing Destination:ab8b0e8d9d25.tr29804.eastus2-a.worker.database.windows.net,11021 2026-02-01T21:45:37.7082556Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:45:37.7083135Z Executed DbCommand (30ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:45:37.7083173Z SELECT 1 2026-02-01T21:45:37.7384879Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:45:37.7385299Z Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:45:37.7385337Z SELECT 1 2026-02-01T21:45:37.7659723Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:45:37.7660316Z Executed DbCommand (23ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:45:37.7660414Z SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2026-02-01T21:45:37.7692002Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:45:37.7692202Z Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:45:37.7692236Z SELECT 1 2026-02-01T21:45:37.7707376Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:45:37.7707729Z Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:45:37.7708789Z SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2026-02-01T21:45:37.793677Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:45:37.7937173Z Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:45:37.7937218Z SELECT [MigrationId], [ProductVersion] 2026-02-01T21:45:37.7937307Z FROM [__EFMigrationsHistory] 2026-02-01T21:45:37.7941641Z ORDER BY [MigrationId]; 2026-02-01T21:45:37.8199948Z info: Microsoft.EntityFrameworkCore.Migrations[20402] 2026-02-01T21:45:37.8200579Z Applying migration '20260201201423_AddEasyDutch'. 2026-02-01T21:45:38.171307Z fail: Microsoft.EntityFrameworkCore.Database.Command[20102] 2026-02-01T21:45:38.1713847Z Failed executing DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:45:38.1718849Z IF EXISTS (SELECT * FROM [sys].[identity_columns] WHERE [name] IN (N'Id', N'ChatUrl', N'Description', N'DonateUrl', N'EmailAddress', N'ForumUrl', N'HomeUrl', N'IssuesUrl', N'LicenseId', N'Name', N'OnionUrl', N'PolicyUrl', N'SubmissionUrl') AND [object_id] = OBJECT_ID(N'[FilterList]')) 2026-02-01T21:45:38.1718974Z SET IDENTITY_INSERT [FilterList] ON; 2026-02-01T21:45:38.1728119Z INSERT INTO [FilterList] ([Id], [ChatUrl], [Description], [DonateUrl], [EmailAddress], [ForumUrl], [HomeUrl], [IssuesUrl], [LicenseId], [Name], [OnionUrl], [PolicyUrl], [SubmissionUrl]) 2026-02-01T21:45:38.1728222Z VALUES (2845, NULL, N'Dutch filterlist to use with uBlock Origin', NULL, NULL, NULL, N'https://github.com/EasyDutch-uBlockOrigin/EasyDutch/', N'https://github.com/EasyDutch-uBlockOrigin/EasyDutch/issues', 4, N'EasyDutch', NULL, NULL, NULL); 2026-02-01T21:45:38.1728273Z IF EXISTS (SELECT * FROM [sys].[identity_columns] WHERE [name] IN (N'Id', N'ChatUrl', N'Description', N'DonateUrl', N'EmailAddress', N'ForumUrl', N'HomeUrl', N'IssuesUrl', N'LicenseId', N'Name', N'OnionUrl', N'PolicyUrl', N'SubmissionUrl') AND [object_id] = OBJECT_ID(N'[FilterList]')) 2026-02-01T21:45:38.1728307Z SET IDENTITY_INSERT [FilterList] OFF; 2026-02-01T21:45:38.2351991Z fail: Microsoft.Extensions.Hosting.Internal.Host[11] 2026-02-01T21:45:38.2353569Z Hosting failed to start 2026-02-01T21:45:38.2365281Z Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.FilterList' with unique index 'IX_FilterList_Name'. The duplicate key value is (EasyDutch). 2026-02-01T21:45:38.2365395Z The statement has been terminated. 2026-02-01T21:45:38.2365435Z at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action 1 wrapCloseInAction) 2026-02-01T21:45:38.2365469Z at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)2026-02-01T21:45:38.2365502Z at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) 2026-02-01T21:45:38.2365539Z at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 2026-02-01T21:45:38.2365574Z at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) 2026-02-01T21:45:38.2365605Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) 2026-02-01T21:45:38.2365637Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) 2026-02-01T21:45:38.236567Z at Microsoft.Data.SqlClient.SqlCommand.<>c.b__193_1(IAsyncResult asyncResult) 2026-02-01T21:45:38.2365711Z at System.Threading.Tasks.TaskFactory 1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)2026-02-01T21:45:38.2365735Z --- End of stack trace from previous location --- 2026-02-01T21:45:38.2365765Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:45:38.2365794Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:45:38.2365824Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:45:38.2365856Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T21:45:38.2365887Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T21:45:38.2365919Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T21:45:38.2365958Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T21:45:38.2365992Z at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) 2026-02-01T21:45:38.2366034Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T21:45:38.2366075Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T21:45:38.236611Z at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable 1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation) 2026-02-01T21:45:38.2366142Z ClientConnectionId:534ba2cd-0720-4df0-8aa7-ef6d18872e3b 2026-02-01T21:45:38.2366167Z Error Number:2601,State:1,Class:14 2026-02-01T21:45:38.2366195Z ClientConnectionId before routing:feda2883-29ca-437c-8f0a-379c798a2636 2026-02-01T21:45:38.2366225Z Routing Destination:ab8b0e8d9d25.tr29804.eastus2-a.worker.database.windows.net,11021 2026-02-01T21:45:38.9378417Z Unhandled exception. Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.FilterList' with unique index 'IX_FilterList_Name'. The duplicate key value is (EasyDutch). 2026-02-01T21:45:38.937946Z The statement has been terminated. 2026-02-01T21:45:38.9379502Z at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)2026-02-01T21:45:38.9379532Z at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action 1 wrapCloseInAction) 2026-02-01T21:45:38.9379563Z at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) 2026-02-01T21:45:38.9379599Z at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 2026-02-01T21:45:38.9379629Z at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) 2026-02-01T21:45:38.9379656Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) 2026-02-01T21:45:38.9379683Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) 2026-02-01T21:45:38.9379709Z at Microsoft.Data.SqlClient.SqlCommand.<>c.<InternalExecuteNonQueryAsync>b__193_1(IAsyncResult asyncResult) 2026-02-01T21:45:38.937975Z at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) 2026-02-01T21:45:38.9379774Z --- End of stack trace from previous location --- 2026-02-01T21:45:38.9379802Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:45:38.9379831Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:45:38.9379859Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:45:38.9379888Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T21:45:38.9379917Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T21:45:38.9379947Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T21:45:38.9379986Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T21:45:38.9380014Z at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) 2026-02-01T21:45:38.938005Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T21:45:38.9380083Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T21:45:38.9380113Z at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation)2026-02-01T21:45:38.938014Z at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) 2026-02-01T21:45:38.9380167Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) 2026-02-01T21:45:38.9380448Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) 2026-02-01T21:45:38.9380495Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) 2026-02-01T21:45:38.9380526Z at Program.$(String[] args) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Api/Program.cs:line 30 2026-02-01T21:45:38.9380554Z ClientConnectionId:534ba2cd-0720-4df0-8aa7-ef6d18872e3b 2026-02-01T21:45:38.9380583Z Error Number:2601,State:1,Class:14 2026-02-01T21:45:38.9380612Z ClientConnectionId before routing:feda2883-29ca-437c-8f0a-379c798a2636 2026-02-01T21:45:38.9380641Z Routing Destination:ab8b0e8d9d25.tr29804.eastus2-a.worker.database.windows.net,11021 2026-02-01T21:53:28.6895331Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:53:28.6896164Z Executed DbCommand (374ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:53:28.6896202Z SELECT 1 2026-02-01T21:53:29.1867521Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:53:29.1868404Z Executed DbCommand (98ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:53:29.1868442Z SELECT 1 2026-02-01T21:53:29.4386334Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:53:29.4388379Z Executed DbCommand (202ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:53:29.438842Z SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2026-02-01T21:53:29.462549Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:53:29.4625905Z Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:53:29.4625939Z SELECT 1 2026-02-01T21:53:29.4632944Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:53:29.4633022Z Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:53:29.4633054Z SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2026-02-01T21:53:29.6946961Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T21:53:29.6947179Z Executed DbCommand (35ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:53:29.6947214Z SELECT [MigrationId], [ProductVersion] 2026-02-01T21:53:29.694724Z FROM [__EFMigrationsHistory] 2026-02-01T21:53:29.6995968Z ORDER BY [MigrationId]; 2026-02-01T21:53:30.1116034Z info: Microsoft.EntityFrameworkCore.Migrations[20402] 2026-02-01T21:53:30.1116426Z Applying migration '20260201201423_AddEasyDutch'. 2026-02-01T21:53:35.1871925Z fail: Microsoft.EntityFrameworkCore.Database.Command[20102] 2026-02-01T21:53:35.187243Z Failed executing DbCommand (201ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T21:53:35.8428534Z IF EXISTS (SELECT * FROM [sys].[identity_columns] WHERE [name] IN (N'Id', N'ChatUrl', N'Description', N'DonateUrl', N'EmailAddress', N'ForumUrl', N'HomeUrl', N'IssuesUrl', N'LicenseId', N'Name', N'OnionUrl', N'PolicyUrl', N'SubmissionUrl') AND [object_id] = OBJECT_ID(N'[FilterList]')) 2026-02-01T21:53:35.8428708Z SET IDENTITY_INSERT [FilterList] ON; 2026-02-01T21:53:35.8428747Z INSERT INTO [FilterList] ([Id], [ChatUrl], [Description], [DonateUrl], [EmailAddress], [ForumUrl], [HomeUrl], [IssuesUrl], [LicenseId], [Name], [OnionUrl], [PolicyUrl], [SubmissionUrl]) 2026-02-01T21:53:35.8428795Z VALUES (2845, NULL, N'Dutch filterlist to use with uBlock Origin', NULL, NULL, NULL, N'https://github.com/EasyDutch-uBlockOrigin/EasyDutch/', N'https://github.com/EasyDutch-uBlockOrigin/EasyDutch/issues', 4, N'EasyDutch', NULL, NULL, NULL); 2026-02-01T21:53:35.8428833Z IF EXISTS (SELECT * FROM [sys].[identity_columns] WHERE [name] IN (N'Id', N'ChatUrl', N'Description', N'DonateUrl', N'EmailAddress', N'ForumUrl', N'HomeUrl', N'IssuesUrl', N'LicenseId', N'Name', N'OnionUrl', N'PolicyUrl', N'SubmissionUrl') AND [object_id] = OBJECT_ID(N'[FilterList]')) 2026-02-01T21:53:35.8428858Z SET IDENTITY_INSERT [FilterList] OFF; 2026-02-01T21:53:36.409529Z fail: Microsoft.Extensions.Hosting.Internal.Host[11] 2026-02-01T21:53:36.4095777Z Hosting failed to start 2026-02-01T21:53:36.4096923Z Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.FilterList' with unique index 'IX_FilterList_Name'. The duplicate key value is (EasyDutch). 2026-02-01T21:53:36.4096992Z The statement has been terminated. 2026-02-01T21:53:36.4097028Z at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action 1 wrapCloseInAction) 2026-02-01T21:53:36.4097812Z at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)2026-02-01T21:53:36.4098465Z at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) 2026-02-01T21:53:36.4098521Z at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 2026-02-01T21:53:36.4099211Z at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) 2026-02-01T21:53:36.4099259Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) 2026-02-01T21:53:36.4100905Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) 2026-02-01T21:53:36.4100983Z at Microsoft.Data.SqlClient.SqlCommand.<>c.b__193_1(IAsyncResult asyncResult) 2026-02-01T21:53:36.4101817Z at System.Threading.Tasks.TaskFactory 1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)2026-02-01T21:53:36.4102203Z --- End of stack trace from previous location --- 2026-02-01T21:53:36.4102875Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:53:36.4102927Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:53:36.4103589Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:53:36.410449Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T21:53:36.4105245Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T21:53:36.4106969Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T21:53:36.410706Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T21:53:36.4165196Z at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) 2026-02-01T21:53:36.4166176Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T21:53:36.428434Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T21:53:36.4284564Z at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable 1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation) 2026-02-01T21:53:36.4284601Z ClientConnectionId:5e43277d-4acd-41ed-af7b-33ac5efeab88 2026-02-01T21:53:36.4284628Z Error Number:2601,State:1,Class:14 2026-02-01T21:53:36.4284725Z ClientConnectionId before routing:97618e49-883f-4ced-b302-c40fde28051a 2026-02-01T21:53:36.4284754Z Routing Destination:ab8b0e8d9d25.tr29804.eastus2-a.worker.database.windows.net,11021 2026-02-01T21:53:40.6844577Z Unhandled exception. Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.FilterList' with unique index 'IX_FilterList_Name'. The duplicate key value is (EasyDutch). 2026-02-01T21:53:40.684509Z The statement has been terminated. 2026-02-01T21:53:40.684513Z at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)2026-02-01T21:53:40.6845162Z at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action 1 wrapCloseInAction) 2026-02-01T21:53:40.6845196Z at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) 2026-02-01T21:53:40.6845231Z at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 2026-02-01T21:53:40.6845262Z at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) 2026-02-01T21:53:40.6845291Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) 2026-02-01T21:53:40.6845342Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) 2026-02-01T21:53:40.6845371Z at Microsoft.Data.SqlClient.SqlCommand.<>c.<InternalExecuteNonQueryAsync>b__193_1(IAsyncResult asyncResult) 2026-02-01T21:53:40.6845404Z at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) 2026-02-01T21:53:40.6845432Z --- End of stack trace from previous location --- 2026-02-01T21:53:40.6845464Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:53:40.6845495Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:53:40.6845528Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T21:53:40.6845562Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T21:53:40.6845597Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T21:53:40.6845641Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T21:53:40.6845676Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T21:53:40.6845708Z at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) 2026-02-01T21:53:40.6845748Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T21:53:40.6845787Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T21:53:40.6845822Z at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation)2026-02-01T21:53:40.6845851Z at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) 2026-02-01T21:53:40.6845895Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) 2026-02-01T21:53:40.6846196Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) 2026-02-01T21:53:40.6846232Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) 2026-02-01T21:53:40.6846263Z at Program.$(String[] args) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Api/Program.cs:line 30 2026-02-01T21:53:40.6846289Z ClientConnectionId:5e43277d-4acd-41ed-af7b-33ac5efeab88 2026-02-01T21:53:40.6846316Z Error Number:2601,State:1,Class:14 2026-02-01T21:53:40.6846345Z ClientConnectionId before routing:97618e49-883f-4ced-b302-c40fde28051a 2026-02-01T21:53:40.6846373Z Routing Destination:ab8b0e8d9d25.tr29804.eastus2-a.worker.database.windows.net,11021 2026-02-01T22:02:35.974Z No new trace in the past 1 min(s). 2026-02-01T22:03:35.974Z No new trace in the past 2 min(s). 2026-02-01T22:03:53.0565004Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:03:53.0565215Z Executed DbCommand (187ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:03:53.0565254Z SELECT 1 2026-02-01T22:03:53.4198153Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:03:53.4198552Z Executed DbCommand (16ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:03:53.4198751Z SELECT 1 2026-02-01T22:03:53.4716243Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:03:53.4716505Z Executed DbCommand (41ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:03:53.4716544Z SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2026-02-01T22:03:53.4755412Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:03:53.4756853Z Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:03:53.4756904Z SELECT 1 2026-02-01T22:03:53.4780061Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:03:53.478015Z Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:03:53.4780182Z SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2026-02-01T22:03:53.5343361Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:03:53.534358Z Executed DbCommand (34ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:03:53.5343618Z SELECT [MigrationId], [ProductVersion] 2026-02-01T22:03:53.5343646Z FROM [__EFMigrationsHistory] 2026-02-01T22:03:53.5344386Z ORDER BY [MigrationId]; 2026-02-01T22:03:53.5822188Z info: Microsoft.EntityFrameworkCore.Migrations[20402] 2026-02-01T22:03:53.5822621Z Applying migration '20260201201423_AddEasyDutch'. 2026-02-01T22:03:54.8202319Z fail: Microsoft.EntityFrameworkCore.Database.Command[20102] 2026-02-01T22:03:54.8202778Z Failed executing DbCommand (4ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:03:54.8202864Z IF EXISTS (SELECT * FROM [sys].[identity_columns] WHERE [name] IN (N'Id', N'ChatUrl', N'Description', N'DonateUrl', N'EmailAddress', N'ForumUrl', N'HomeUrl', N'IssuesUrl', N'LicenseId', N'Name', N'OnionUrl', N'PolicyUrl', N'SubmissionUrl') AND [object_id] = OBJECT_ID(N'[FilterList]')) 2026-02-01T22:03:54.8202896Z SET IDENTITY_INSERT [FilterList] ON; 2026-02-01T22:03:54.8202933Z INSERT INTO [FilterList] ([Id], [ChatUrl], [Description], [DonateUrl], [EmailAddress], [ForumUrl], [HomeUrl], [IssuesUrl], [LicenseId], [Name], [OnionUrl], [PolicyUrl], [SubmissionUrl]) 2026-02-01T22:03:54.820305Z VALUES (2845, NULL, N'Dutch filterlist to use with uBlock Origin', NULL, NULL, NULL, N'https://github.com/EasyDutch-uBlockOrigin/EasyDutch/', N'https://github.com/EasyDutch-uBlockOrigin/EasyDutch/issues', 4, N'EasyDutch', NULL, NULL, NULL); 2026-02-01T22:03:54.8203092Z IF EXISTS (SELECT * FROM [sys].[identity_columns] WHERE [name] IN (N'Id', N'ChatUrl', N'Description', N'DonateUrl', N'EmailAddress', N'ForumUrl', N'HomeUrl', N'IssuesUrl', N'LicenseId', N'Name', N'OnionUrl', N'PolicyUrl', N'SubmissionUrl') AND [object_id] = OBJECT_ID(N'[FilterList]')) 2026-02-01T22:03:54.8203123Z SET IDENTITY_INSERT [FilterList] OFF; 2026-02-01T22:03:55.8815829Z fail: Microsoft.Extensions.Hosting.Internal.Host[11] 2026-02-01T22:03:55.881712Z Hosting failed to start 2026-02-01T22:03:55.8817175Z Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.FilterList' with unique index 'IX_FilterList_Name'. The duplicate key value is (EasyDutch). 2026-02-01T22:03:55.8817206Z The statement has been terminated. 2026-02-01T22:03:55.881724Z at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action 1 wrapCloseInAction) 2026-02-01T22:03:55.8817302Z at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)2026-02-01T22:03:55.8817335Z at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) 2026-02-01T22:03:55.8817368Z at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 2026-02-01T22:03:55.8817398Z at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) 2026-02-01T22:03:55.8817454Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) 2026-02-01T22:03:55.8817482Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) 2026-02-01T22:03:55.8817508Z at Microsoft.Data.SqlClient.SqlCommand.<>c.b__193_1(IAsyncResult asyncResult) 2026-02-01T22:03:55.8817537Z at System.Threading.Tasks.TaskFactory 1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)2026-02-01T22:03:55.8817561Z --- End of stack trace from previous location --- 2026-02-01T22:03:55.881759Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:03:55.8817618Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:03:55.8817648Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:03:55.8817679Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T22:03:55.8817716Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T22:03:55.8817747Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T22:03:55.8817778Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T22:03:55.8817806Z at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) 2026-02-01T22:03:55.881784Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T22:03:55.8817873Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T22:03:55.8817903Z at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable 1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation) 2026-02-01T22:03:55.8817927Z ClientConnectionId:b20dbf57-dafc-49a2-a597-74a4cfbf6d0a 2026-02-01T22:03:55.8817962Z Error Number:2601,State:1,Class:14 2026-02-01T22:03:55.8818283Z ClientConnectionId before routing:d694aac6-7bbb-456e-9100-48a52c63755e 2026-02-01T22:03:55.8818318Z Routing Destination:ab8b0e8d9d25.tr29804.eastus2-a.worker.database.windows.net,11021 2026-02-01T22:03:56.4148902Z Unhandled exception. Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.FilterList' with unique index 'IX_FilterList_Name'. The duplicate key value is (EasyDutch). 2026-02-01T22:03:56.4149736Z The statement has been terminated. 2026-02-01T22:03:56.414978Z at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)2026-02-01T22:03:56.4149812Z at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action 1 wrapCloseInAction) 2026-02-01T22:03:56.4149844Z at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) 2026-02-01T22:03:56.414988Z at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 2026-02-01T22:03:56.4149912Z at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) 2026-02-01T22:03:56.4149942Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) 2026-02-01T22:03:56.4149993Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) 2026-02-01T22:03:56.4150024Z at Microsoft.Data.SqlClient.SqlCommand.<>c.<InternalExecuteNonQueryAsync>b__193_1(IAsyncResult asyncResult) 2026-02-01T22:03:56.4150058Z at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) 2026-02-01T22:03:56.4150082Z --- End of stack trace from previous location --- 2026-02-01T22:03:56.4150112Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:03:56.4150145Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:03:56.4150178Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:03:56.4150213Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T22:03:56.4150248Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T22:03:56.4150295Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T22:03:56.4150328Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T22:03:56.415036Z at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) 2026-02-01T22:03:56.4150402Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T22:03:56.4150443Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T22:03:56.4150477Z at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation)2026-02-01T22:03:56.4150507Z at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) 2026-02-01T22:03:56.4150544Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) 2026-02-01T22:03:56.4150843Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) 2026-02-01T22:03:56.4150878Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) 2026-02-01T22:03:56.4150911Z at Program.$(String[] args) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Api/Program.cs:line 30 2026-02-01T22:03:56.415094Z ClientConnectionId:b20dbf57-dafc-49a2-a597-74a4cfbf6d0a 2026-02-01T22:03:56.4150964Z Error Number:2601,State:1,Class:14 2026-02-01T22:03:56.4150989Z ClientConnectionId before routing:d694aac6-7bbb-456e-9100-48a52c63755e 2026-02-01T22:03:56.4151018Z Routing Destination:ab8b0e8d9d25.tr29804.eastus2-a.worker.database.windows.net,11021 2026-02-01T22:05:21.980Z No new trace in the past 1 min(s). 2026-02-01T22:06:21.980Z No new trace in the past 2 min(s). 2026-02-01T22:07:21.980Z No new trace in the past 3 min(s). 2026-02-01T22:08:21.980Z No new trace in the past 4 min(s). 2026-02-01T22:09:06.0751757Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:09:06.0752178Z Executed DbCommand (65ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:09:06.0752217Z SELECT 1 2026-02-01T22:09:06.227289Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:09:06.2273329Z Executed DbCommand (8ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:09:06.2273367Z SELECT 1 2026-02-01T22:09:06.2813687Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:09:06.281411Z Executed DbCommand (50ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:09:06.2814152Z SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2026-02-01T22:09:06.2894983Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:09:06.2895446Z Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:09:06.2895491Z SELECT 1 2026-02-01T22:09:06.2924206Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:09:06.2924587Z Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:09:06.292463Z SELECT OBJECT_ID(N'[__EFMigrationsHistory]'); 2026-02-01T22:09:06.3254809Z info: Microsoft.EntityFrameworkCore.Database.Command[20101] 2026-02-01T22:09:06.3255352Z Executed DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:09:06.3255389Z SELECT [MigrationId], [ProductVersion] 2026-02-01T22:09:06.3255414Z FROM [__EFMigrationsHistory] 2026-02-01T22:09:06.3255502Z ORDER BY [MigrationId]; 2026-02-01T22:09:06.3776092Z info: Microsoft.EntityFrameworkCore.Migrations[20402] 2026-02-01T22:09:06.3776687Z Applying migration '20260201201423_AddEasyDutch'. 2026-02-01T22:09:08.5888609Z fail: Microsoft.EntityFrameworkCore.Database.Command[20102] 2026-02-01T22:09:08.5888955Z Failed executing DbCommand (12ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] 2026-02-01T22:09:08.5896522Z IF EXISTS (SELECT * FROM [sys].[identity_columns] WHERE [name] IN (N'Id', N'ChatUrl', N'Description', N'DonateUrl', N'EmailAddress', N'ForumUrl', N'HomeUrl', N'IssuesUrl', N'LicenseId', N'Name', N'OnionUrl', N'PolicyUrl', N'SubmissionUrl') AND [object_id] = OBJECT_ID(N'[FilterList]')) 2026-02-01T22:09:08.5897218Z SET IDENTITY_INSERT [FilterList] ON; 2026-02-01T22:09:08.589857Z INSERT INTO [FilterList] ([Id], [ChatUrl], [Description], [DonateUrl], [EmailAddress], [ForumUrl], [HomeUrl], [IssuesUrl], [LicenseId], [Name], [OnionUrl], [PolicyUrl], [SubmissionUrl]) 2026-02-01T22:09:08.5899086Z VALUES (2845, NULL, N'Dutch filterlist to use with uBlock Origin', NULL, NULL, NULL, N'https://github.com/EasyDutch-uBlockOrigin/EasyDutch/', N'https://github.com/EasyDutch-uBlockOrigin/EasyDutch/issues', 4, N'EasyDutch', NULL, NULL, NULL); 2026-02-01T22:09:08.5899664Z IF EXISTS (SELECT * FROM [sys].[identity_columns] WHERE [name] IN (N'Id', N'ChatUrl', N'Description', N'DonateUrl', N'EmailAddress', N'ForumUrl', N'HomeUrl', N'IssuesUrl', N'LicenseId', N'Name', N'OnionUrl', N'PolicyUrl', N'SubmissionUrl') AND [object_id] = OBJECT_ID(N'[FilterList]')) 2026-02-01T22:09:08.5899723Z SET IDENTITY_INSERT [FilterList] OFF; 2026-02-01T22:09:08.6829329Z fail: Microsoft.Extensions.Hosting.Internal.Host[11] 2026-02-01T22:09:08.6831126Z Hosting failed to start 2026-02-01T22:09:08.6831187Z Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.FilterList' with unique index 'IX_FilterList_Name'. The duplicate key value is (EasyDutch). 2026-02-01T22:09:08.6831216Z The statement has been terminated. 2026-02-01T22:09:08.6831307Z at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action 1 wrapCloseInAction) 2026-02-01T22:09:08.6831344Z at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)2026-02-01T22:09:08.683138Z at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) 2026-02-01T22:09:08.683142Z at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 2026-02-01T22:09:08.6832733Z at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) 2026-02-01T22:09:08.6832771Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) 2026-02-01T22:09:08.6832798Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) 2026-02-01T22:09:08.6832824Z at Microsoft.Data.SqlClient.SqlCommand.<>c.b__193_1(IAsyncResult asyncResult) 2026-02-01T22:09:08.6832854Z at System.Threading.Tasks.TaskFactory 1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)2026-02-01T22:09:08.6832894Z --- End of stack trace from previous location --- 2026-02-01T22:09:08.6832924Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:09:08.6832954Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:09:08.6832983Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:09:08.6833015Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T22:09:08.6833921Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T22:09:08.6833998Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T22:09:08.6834032Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T22:09:08.6834073Z at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) 2026-02-01T22:09:08.6834109Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T22:09:08.6834142Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T22:09:08.6834173Z at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable 1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation) 2026-02-01T22:09:08.68342Z ClientConnectionId:08de1fb8-eaa2-43ef-8830-a7871c6474fe 2026-02-01T22:09:08.6834227Z Error Number:2601,State:1,Class:14 2026-02-01T22:09:08.6834465Z ClientConnectionId before routing:cd8d3b1d-14ff-478e-94ef-65300e83ecc1 2026-02-01T22:09:08.6834503Z Routing Destination:ab8b0e8d9d25.tr29804.eastus2-a.worker.database.windows.net,11021 2026-02-01T22:09:10.1859824Z Unhandled exception. Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.FilterList' with unique index 'IX_FilterList_Name'. The duplicate key value is (EasyDutch). 2026-02-01T22:09:10.1860286Z The statement has been terminated. 2026-02-01T22:09:10.1860327Z at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)2026-02-01T22:09:10.1860359Z at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action 1 wrapCloseInAction) 2026-02-01T22:09:10.1860389Z at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) 2026-02-01T22:09:10.186042Z at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 2026-02-01T22:09:10.1860452Z at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) 2026-02-01T22:09:10.1860481Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) 2026-02-01T22:09:10.1860527Z at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) 2026-02-01T22:09:10.1860553Z at Microsoft.Data.SqlClient.SqlCommand.<>c.<InternalExecuteNonQueryAsync>b__193_1(IAsyncResult asyncResult) 2026-02-01T22:09:10.1860583Z at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) 2026-02-01T22:09:10.1860606Z --- End of stack trace from previous location --- 2026-02-01T22:09:10.1860635Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:09:10.1860663Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:09:10.1860693Z at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) 2026-02-01T22:09:10.1860723Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T22:09:10.1860753Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T22:09:10.1860799Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)2026-02-01T22:09:10.186083Z at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable 1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) 2026-02-01T22:09:10.1860858Z at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) 2026-02-01T22:09:10.1860894Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T22:09:10.1860927Z at FilterLists.Directory.Infrastructure.Persistence.Queries.MigrationService.StartingAsync(CancellationToken cancellationToken) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/MigrationService.cs:line 40 2026-02-01T22:09:10.1860959Z at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation)2026-02-01T22:09:10.1860984Z at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) 2026-02-01T22:09:10.1861024Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) 2026-02-01T22:09:10.1861463Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) 2026-02-01T22:09:10.1861507Z at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) 2026-02-01T22:09:10.1861538Z at Program.$(String[] args) in /home/runner/work/FilterLists/FilterLists/services/Directory/FilterLists.Directory.Api/Program.cs:line 30 2026-02-01T22:09:10.1861568Z ClientConnectionId:08de1fb8-eaa2-43ef-8830-a7871c6474fe 2026-02-01T22:09:10.1861594Z Error Number:2601,State:1,Class:14 2026-02-01T22:09:10.1861623Z ClientConnectionId before routing:cd8d3b1d-14ff-478e-94ef-65300e83ecc1 2026-02-01T22:09:10.1861654Z Routing Destination:ab8b0e8d9d25.tr29804.eastus2-a.worker.database.windows.net,11021 |
Yes, the fix in commit 47fb114 fully resolves all errors. Every insert operation now has an
The migration is fully idempotent - it will succeed whether the data exists, doesn't exist, or partially exists. |
The
AddEasyDutchmigration fails on deployment with duplicate key errors because the data already exists in the database from a previous deployment.Root Causes
SegmentNumber Column Missing: When JSON lacks
segmentNumber, deserialization defaults to0(C#shortdefault), but the migration omits the column entirely, causing SQL to apply schema default of1. Designer expects0; database gets1.Duplicate Data Insertion: PR Add EasyDutch #5450 added EasyDutch data to JSON files and was deployed before PR Add EF Core migration for EasyDutch filter list (PR #5450) #5452's migration. When the migration runs, it attempts to insert data that already exists, causing:
Changes
Commit 1: Added SegmentNumber Column
SegmentNumbercolumn toInsertDatastatement with explicit(short)0values for all 10 FilterList 2845 ViewUrl recordsCommit 2: Made Migration Idempotent
InsertData()calls withmigrationBuilder.Sql()containingIF NOT EXISTSchecksIDENTITY_INSERThandling for tables with identity columnsBefore:
After:
Testing
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.