From 8dec3816fad2f01fb42f7daf4a614492257dec3d Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 14 May 2020 15:20:10 +0000 Subject: [PATCH] --- server/AyaNova/biz/WidgetBiz.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/server/AyaNova/biz/WidgetBiz.cs b/server/AyaNova/biz/WidgetBiz.cs index e7ddd678..962c55ed 100644 --- a/server/AyaNova/biz/WidgetBiz.cs +++ b/server/AyaNova/biz/WidgetBiz.cs @@ -177,26 +177,20 @@ namespace AyaNova.Biz // internal async Task ResetSerial(long newSerial) { - /* ALTER TABLE table_name ALTER COLUMN column_name { SET GENERATED { ALWAYS| BY DEFAULT } | SET sequence_option | RESTART [ [ WITH ] restart ] } */ - - using (var command = ct.Database.GetDbConnection().CreateCommand()) { command.CommandText = $"alter table awidget alter column serial restart with {newSerial}"; await ct.Database.OpenConnectionAsync(); await command.ExecuteNonQueryAsync(); - await ct.Database.CloseConnectionAsync(); + await ct.Database.CloseConnectionAsync(); } - - await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, 0, BizType, AyaEvent.ResetSerial, newSerial.ToString()), ct); - return true; }