Updates
This commit is contained in:
12
SqlTable.cs
12
SqlTable.cs
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user