All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Update dependencies
- Fix LastInsertId error in postgres driver (by @oxyno-zeta)
- Update dependencies
- Add to test suite pure-go sqlite implementation: github.com/glebarez/sqlite
- Update databases for ci pipelines and local development
- Extract integration tests and their deps into different integration-test package
- Refactor raw sql query into native Gorm method chain, for better compatibility with all dialects
- Refactor plain sql mutation statements (create, insert, delete) into native Gorm methods
- Update dependencies
- Update dependencies
- Update dependencies
- Update dependencies
- Make it compatible with Gorm v2, which uses a new import path and has breaking changes on its API (#45, #46).
- Add option to return an error if the database have unknown migrations
(defaults to
false
) (#37).
- Making the code more safe by checking more errors (#35).
- Fixed and written tests for transaction handling (#34, #10). Enabling transation is recommend, but only supported for databases that support DDL transactions (PostgreSQL, Microsoft SQL Server and SQLite).
- Allow an empty migration list if a
InitSchema
function is defined (#28).
- Fixed
testify
import path fromgopkg.in/stretchr/testify.v1
togithub.com/stretchr/testify
(#27).
- Starting from this release, this package is available as a Go Module.
Import path is still
gopkg.in/gormigrate.v1
in this major version, but will change togithub.com/go-gormigrate/gormigrate/v2
in the next major release; - Validate the ID exists on the migration list (#20, #21).
- Added
MigrateTo
andRollbackTo
methods (#15); - CI now runs tests for SQLite, PostgreSQL, MySQL and Microsoft SQL Server.
- An empty migration list is not allowed anymore. Please, make sure that you have at least one migration, even if dummy;
- Add
IDColumnSize
options, which defaults to255
(#7);
- Assuming default options if blank;
- Returning an error if the migration list has a duplicated migration ID.
- Introduce changelog
- Fix
RollbackLast
(#4).