Skip to content

5.0.0

Compare
Choose a tag to compare
@jbogard jbogard released this 14 Jan 14:49
· 33 commits to master since this release
c654c49

As part of this release we had 12 issues closed.

Improvements/Features

  • #91 Adding support for including and excluding schemas with tables across all databases
  • #90 .NET Standard 2.1 and .NET 6
  • #88 Keyword not supported: 'port' not support for PostgreSQL
  • #85 Fix issue #84 "Reset fails in MSSQL when using temporal tables and reserved words for table names"
  • #84 Reset fails in MSSQL when using temporal tables and reserved words for table names
  • #82 Fix issue #52 "Oracle doesn't query for relationships properly"
  • #81 Throw InvalidOperationException When Ignore only one table
  • #79 Add BuildReseedSql for mysql
  • #77 FK uniqueness issues
  • #76 Add sequence reset for Postgres.
  • #73 Reset fails in SQL Server when temporal table or history table are in non-default schemas
  • #70 Checkpoint tries to truncate internal Postgres tables

Breaking changes

TablesToIgnore and TablesToInclude changed from type string to Table

In order to support ignoring/including both schemas and tables, the TablesToIgnore and TablesToInclude properties are now of type Table:

public class Checkpoint
{
-	public string[] TablesToIgnore { get; init; } = Array.Empty<string>();
-	public string[] TablesToInclude { get; init; } = Array.Empty<string>();
+	public Table[] TablesToIgnore { get; init; } = Array.Empty<Table>();
+	public Table[] TablesToInclude { get; init; } = Array.Empty<Table>();

For existing code that still needs to ignore/include tables regardless of the schema, the Table object has an implicit conversion operator from string. Specify the array type to activate the conversion:

var checkpoint = new Checkpoint
{
    TablesToIgnore = new Table[]
    {
        "Foo",
        "Bar"
    }
};

Or specify the schema by instantiating a Table object:

var checkpoint = new Checkpoint
{
    TablesToIgnore = new[]
    {
        new Table("dbo", "Foo"), 
        new Table("dbo", "Bar")
    }
};

Targeting only netstandard2.1

Respawn only targets netstandard2.1 and above (.NET 5, 6, etc.). For .NET Core-based tests, upgrade to .NET 3.1 or later.

For .NET Framework-based tests you may:

  • Upgrade to .NET Core for the test project
  • Continue to use 4.0