public void Setup() { t = new Table("users"); t.AddColumn("id", "integer", true, true, true); t.AddColumn("name"); t.AddColumn("password"); f = new MySQLMigrationFormatter(""); }
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); } } }
public MigrationRepository(IMigrationFormatter f) : base(f.CreateConnection()) { this.f = f; }