Skip to content

Commit bc823a5

Browse files
committed
Fix orphaned culumn in databases
1 parent bdc9562 commit bc823a5

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/MaIN.Infrastructure/Configuration/SqlExtensions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System.Data;
21
using Dapper;
32
using MaIN.Infrastructure.Repositories.Abstract;
43
using MaIN.Infrastructure.Repositories.Sql;
54
using Microsoft.Data.SqlClient;
65
using Microsoft.Extensions.DependencyInjection;
6+
using System.Data;
77

88
namespace MaIN.Infrastructure.Configuration;
99

@@ -48,7 +48,6 @@ [Messages] NVARCHAR(MAX) NOT NULL, -- Stored as JSON array
4848
[Type] NVARCHAR(MAX) NOT NULL, -- Stored as JSON
4949
[Properties] NVARCHAR(MAX) NULL, -- Stored as JSON
5050
[Visual] BIT NOT NULL DEFAULT 0,
51-
[BackendType] INT NOT NULL DEFAULT 0,
5251
[ConvState] NVARCHAR(MAX) NULL, -- Stored as JSON,
5352
[InferenceParams] NVARCHAR(MAX) NULL, -- Stored as JSON,
5453
[MemoryParams] NVARCHAR(MAX) NULL, -- Stored as JSON
@@ -111,4 +110,4 @@ ALTER TABLE [dbo].[Agents] ADD CONSTRAINT [CK_Agents_Behaviours_JSON]
111110
CHECK (CASE WHEN [Behaviours] IS NULL THEN 1 ELSE ISJSON([Behaviours]) END = 1);
112111
""");
113112
}
114-
}
113+
}

src/MaIN.Infrastructure/Configuration/SqliteExtensions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System.Data;
21
using Dapper;
32
using MaIN.Infrastructure.Repositories.Abstract;
43
using MaIN.Infrastructure.Repositories.Sqlite;
54
using Microsoft.Data.Sqlite;
65
using Microsoft.Extensions.DependencyInjection;
6+
using System.Data;
77

88
namespace MaIN.Infrastructure.Configuration;
99

@@ -46,7 +46,6 @@ CREATE TABLE IF NOT EXISTS Chats (
4646
Type TEXT NOT NULL, -- Stored as JSON
4747
Properties TEXT, -- Stored as JSON
4848
Visual INTEGER NOT NULL DEFAULT 0,
49-
BackendType INTEGER NOT NULL DEFAULT 0,
5049
ConvState TEXT, -- Stored as JSON
5150
InferenceParams TEXT, -- Stored as JSON
5251
MemoryParams TEXT, -- Stored as JSON
@@ -77,4 +76,4 @@ FOREIGN KEY (ChatId) REFERENCES Chats(Id)
7776
);
7877
");
7978
}
80-
}
79+
}

0 commit comments

Comments
 (0)