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; }