diff options
Diffstat (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/TableInfo.cs')
-rw-r--r-- | docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/TableInfo.cs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/TableInfo.cs b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/TableInfo.cs index 41ef097..4a7ea95 100644 --- a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/TableInfo.cs +++ b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/TableInfo.cs @@ -115,7 +115,6 @@ public class TableInfo ColumnName = "Id", NotNull = true, IsPrimaryKey = true, - IsAutoIncrement = true, }, typeof(long), _columnTypeProvider, _loggerFactory); } @@ -231,26 +230,6 @@ CREATE TABLE {tableName}( return sql; } - public bool CheckExistence(IDbConnection connection) - { - var tableName = TableName; - var count = connection.QuerySingle<int>( - @"SELECT count(*) FROM sqlite_schema WHERE type = 'table' AND tbl_name = @TableName;", - new { TableName = tableName }); - if (count == 0) - { - return false; - } - else if (count > 1) - { - throw new Exception($"More than 1 table has name {tableName}. What happened?"); - } - else - { - return true; - } - } - public void CheckColumnName(string columnName) { if (!ColumnNameList.Contains(columnName)) |