Search Results for

    Show / Hide Table of Contents

    Upgrading from 3.1 to 3.2

    This version contains mostly added features and fixed bugs.

    What is new?

    The most important changes are support for ORACLE 12c and the ability to disable removal of comments from SQL scripts.

    ORACLE 12c

    We're now supporting the new identity generator via Oracle-specific options. The maximum name length was also increased to 128 characters.

    Creating a identity column

    Create.Column("TestColumn").OnTable("TestTable").AsInt64().PrimaryKey().Identity();
    

    Creating a identity column with options

    Create.Column("TestColumn").OnTable("TestTable").AsInt64().PrimaryKey()
        .Identity(OracleGenerationType.Always, startWith: 0, incrementBy: 1, minValue: 0, maxValue: long.MaxValue);
    

    The possible options for the generation are:

    Value Description
    OracleGenerationType.Always A value for the identity column is always generated by the database. Attepts to insert a value will cause an error.
    OracleGenerationType.ByDefault A value for the identity column is generated by the database when no value was given. Attepts to insert a NULL value will cause an error.
    OracleGenerationType.ByDefaultOnNull A value for the identity column is generated by the database when no value or a NULL value was given.

    Disable removal of comments

    There are now options for the external runners to disable removal of comments.

    Important

    The default will change from "stripping" to "non-stripping" of comments in version 4.0.

    dotnet-fm runner

    The option is --strip:false. This didn't work in 3.2.0 and was fixed in 3.2.1.

    msbuild runner

    The value to set is StripComments.

    console runner

    The option to disable stripping is --strip-.

    Allow maintenance objects without tags

    TODO

    Setting the default schema name

    dotnet-fm runner

    The option to set the default schema name is --default-schema-name=yourCustomSchema.

    msbuild runner

    The value to set is DefaultSchemaName.

    console runner

    The option to set the default schema name is --default-schema-name=yourCustomSchema.

    PostgreSQL before 9.2

    The xml column type is now supported for DbType.Xml.

    PostgreSQL 9.2

    We're now supporting the json column type for DbType.Object.

    SQL Server 2008+

    The SPARSE column option can now be set using the .Sparse() extension method.

    Loading the IConventionSet from assemblies

    The external runners will automatically load the IConventionSet implementation from one of the specified assemblies.

    Migration constraints (preview)

    You're now able to decorate migrations with attributes derived from MigrationConstraintAttribute. Those attributes are used to decide if a migration should be applied. Currently, they aren't added to the VersionInfo table when they're not applied, but this might change in the future.

    CurrentVersionMigrationConstraintAttribute

    This ensures that a migration is only executed when the database had at least the given version before the start of the migration. This allows to skip some complex/timely conversion migrations.

    What is fixed?

    • PR #920: Fix Oracle and SqlServer CE which execute queries in preview mode
    • PR #926: Fix another case where queries where executed in preview mode on Oracle (DotConnect)
    • PR #943: Properly quote byte array for SQLite
    • Issue #859: Bug when using PoundSignSingleLineComment with SqlServer
    • PR #999: Fixed bug in postgres description generator when generating full table name with schema
    • Issue #957: FluentMigrator.DotNet.Cli --no-connection throws exception
    • Issue #1001: Problems with transaction in Execute.WithConnection
    • Edit this page
    In this article
    Back to top
    Copyright © 2018 Fluent Migrator Project
    Generated by DocFX
    Creative Commons License
    FluentMigrator Documentation by FluentMigrator Project is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.