This commit is contained in:
2025-08-31 07:32:30 -05:00
parent 8cc304c3d2
commit 0fe77cb654
7 changed files with 446 additions and 138 deletions

View File

@@ -7,7 +7,7 @@ namespace DbMigrate {
public string TableName { get; set; }
public string CreateTableSql { get; set; }
public string OriginalSql { get; set; }
public Dictionary<string, string> Columns { get; set; }
public ColumnCollection Columns { get; set; }
public Dictionary<string, string> Indexes { get; set; }
public Dictionary<string, string> Triggers { get; set; }
@@ -24,7 +24,7 @@ namespace DbMigrate {
}
private void initTable() {
Columns = new Dictionary<string, string>();
Columns = new ColumnCollection();
Indexes = new Dictionary<string, string>();
Triggers = new Dictionary<string, string>();
CreateTableSql = "";
@@ -54,15 +54,11 @@ namespace DbMigrate {
}
public string[] GetColumnNames() {
return Columns.Keys.ToArray();
}
public string[] GetColumns() {
return Columns.Values.ToArray();
return Columns.GetColumnNames();
}
public bool HasColumn(string columnName) {
return Columns.ContainsKey(columnName);
return Columns.Contains(columnName);
}
public string[] GetTriggerNames() {