From 4e256dfeb7aab6599d33e4e1aa0fb49115f4dec7 Mon Sep 17 00:00:00 2001 From: Professional Date: Wed, 19 Mar 2025 19:32:58 +0700 Subject: [PATCH] =?UTF-8?q?=D1=82=D0=B5=D1=81=D1=82=20=D0=B1=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Program.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Program.cs b/Program.cs index 67741f4..0c004e4 100644 --- a/Program.cs +++ b/Program.cs @@ -651,7 +651,7 @@ class Program while (await tableInfo.ReadAsync()) { - existingColumns.Add(tableInfo["name"].ToString()); + existingColumns.Add(tableInfo["name"]?.ToString() ?? string.Empty); } foreach (var column in requiredColumns) @@ -665,13 +665,13 @@ class Program alterTableCommand.CommandText = "ALTER TABLE Reports ADD COLUMN Priority TEXT NOT NULL DEFAULT 'низкий';"; break; case "Room": - alterTableCommand.CommandText = "ALTER TABLE Reports ADD COLUMN Room TEXT NOT NULL;"; + alterTableCommand.CommandText = "ALTER TABLE Reports ADD COLUMN Room TEXT NOT NULL DEFAULT '';"; break; case "Description": - alterTableCommand.CommandText = "ALTER TABLE Reports ADD COLUMN Description TEXT NOT NULL;"; + alterTableCommand.CommandText = "ALTER TABLE Reports ADD COLUMN Description TEXT NOT NULL DEFAULT '';"; break; case "ReporterName": - alterTableCommand.CommandText = "ALTER TABLE Reports ADD COLUMN ReporterName TEXT NOT NULL;"; + alterTableCommand.CommandText = "ALTER TABLE Reports ADD COLUMN ReporterName TEXT NOT NULL DEFAULT '';"; break; case "DateCreated": alterTableCommand.CommandText = "ALTER TABLE Reports ADD COLUMN DateCreated DATETIME DEFAULT CURRENT_TIMESTAMP;"; @@ -715,6 +715,8 @@ class Program + + private static Dictionary userReportSteps = new Dictionary(); private static Dictionary userReports = new Dictionary();