Exemplo n.º 1
0
 public void Setup()
 {
     t = new Table("items");
     t.AddColumn("id", "integer", true, true, true);
     t.AddColumn("name");
     t.AddColumn("description");
     t.AddColumn("price", "double");
 }
Exemplo n.º 2
0
        public void Setup()
        {
            t = new Table("users");
            t.AddColumn("id", "integer", true, true, true);
            t.AddColumn("name");
            t.AddColumn("password");

            f = new MySQLMigrationFormatter("");
        }
Exemplo n.º 3
0
        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));
        }