Home:ALL Converter>Customize FluentMigrator Postgres VersionInfo Schema

Customize FluentMigrator Postgres VersionInfo Schema

Ask Time:2015-08-24T05:41:56         Author:drneel

Json Formatter

I am trying to use FluentMigrator with PostgreSQL.

I have it running the migrations successfully, however the VersionInfo table is always in the public schema. I read on the FluentMigrator Wiki that I could override the schema name, but it is not working.

Here is my class that I wrote to override the settings:

namespace YARA.Migrations
{
    using FluentMigrator.VersionTableInfo;

    [VersionTableMetaData]
    public class YaraVersionTable : DefaultVersionTableMetaData
    {
        public override string SchemaName
        {
            get { return "dbo"; }
        }

        public override string TableName
        {
            get
            {
                return "MigrationInfo";
            }
        }
    }
}

And here is a screenshot of the db after running the migrations; with neither the schema or changing the table name taking effect for the VersionInfo table.

Thoughts?

screenshot

Author:drneel,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/32171831/customize-fluentmigrator-postgres-versioninfo-schema
yy