aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/TableInfo.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-12-25 14:52:46 +0800
committercrupest <crupest@outlook.com>2022-12-25 14:53:58 +0800
commit4368b3f0474c43c717f9fc96fbae0b3854bac50f (patch)
tree0004822a2ea7a987176e28396c7cc74cb61ef692 /docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/TableInfo.cs
parent96330e77cf13c690232c2c269d244d1ff62ff544 (diff)
downloadcrupest-4368b3f0474c43c717f9fc96fbae0b3854bac50f.tar.gz
crupest-4368b3f0474c43c717f9fc96fbae0b3854bac50f.tar.bz2
crupest-4368b3f0474c43c717f9fc96fbae0b3854bac50f.zip
Add migration.
Diffstat (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/TableInfo.cs')
-rw-r--r--docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/TableInfo.cs21
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))