public void Setup() { t = new Table("items"); t.AddColumn("id", "integer", true, true, true); t.AddColumn("name"); t.AddColumn("description"); t.AddColumn("price", "double"); }
public void Setup() { t = new Table("users"); t.AddColumn("id", "integer", true, true, true); t.AddColumn("name"); t.AddColumn("password"); f = new MySQLMigrationFormatter(""); }
public void RemoveColumn(string tableName, params string[] columns) { string cols = ""; int i = 1; foreach (var c in columns) { cols += c; if (i++ < columns.Length) { cols += ", "; } } OnMigrating(new MigrationEventArgs(string.Format("Removing {0} from {1}...", cols, tableName))); var t = new Table(tableName); foreach (var c in columns) { t.AddColumn(c); } OnColumnRemove(new TableEventArgs(t)); }