migrator v0.3.0 Release Notes

Release Date: 2020-04-10 // about 4 years ago

Previous changes from v0.2.0

  • ๐Ÿ”„ Changes since v0.1.0

    v0.1.0...400b0c9

    • README improvements.
    • โœ… Test coverage improvements.
    • โž• Add Pending func to get pending migrations: #9
    • โž• Add TableName opt, so the migration table name is now seteable: #13

    ๐Ÿ’ฅ Breaking changes, now migrations must be set on New via Migrations opt:

        m := migrator.New(
            Migrations(
                &migrator.Migration{
                    Name: "Create table foo",
                    Func: func(tx *sql.Tx) error {
                        if _, err := tx.Exec("CREATE TABLE foo (id INT PRIMARY KEY)"); err != nil {
                            return err
                        }
                        return nil
                    },
                },
            ),
        )
    

    Thanks to @adiweiss @cinemast @glerchundi @dufcrule