Example #1
0
        public void Setup()
        {
            t = new Table("users");
            t.AddColumn("id", "integer", true, true, true);
            t.AddColumn("name");
            t.AddColumn("password");

            f = new MySQLMigrationFormatter("");
        }
Example #2
0
 public Migrator(Assembly assembly, IMigrationFormatter formatter)
 {
     this.repository = new MigrationRepository(formatter);
     this.migrations = new List<Migration>();
     foreach (var t in assembly.GetTypes()) {
         if (t != typeof(Migration) && typeof(Migration).IsAssignableFrom(t)) {
             var m = (Migration)assembly.CreateInstance(t.ToString());
             migrations.Add(m);
         }
     }
 }
Example #3
0
 public MigrationRepository(IMigrationFormatter f)
     : base(f.CreateConnection())
 {
     this.f = f;
 }