I am attempting to use migratordotnet for existing database. My database has around 100 tables and I am attempting to generate initial migration.

I have attempted using

C:\migrations>Migrator.Console.exe SqlServer "Data Source=.\sqlexpress;Initial Catalog=my_database;Integrated Security = True;" MigracijeBaze.dll -dump InitialMigration.cs

Unfortinutely, produced migration has every column with typeof(string). Int, DateTime, Decimal posts are transformed into string. For instance, for table Godine

CREATE TABLE [dbo].[Godine](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [FirmaID] [nvarchar](2) NOT NULL,
    [Godina] [int] NOT NULL,
    [BazaSifri] [nvarchar](50) NOT NULL,
    [BazaPodataka] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Godine] PRIMARY KEY CLUSTERED 
(
    [ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

is produced migration

Database.AddTable("Godine",
    new Column("ID", typeof(String)),
    new Column("FirmaID", typeof(String)),
    new Column("Godina", typeof(String)),
    new Column("BazaSifri", typeof(String)),
    new Column("BazaPodataka", typeof(String)),
);

Shall We Be Held doing a problem? Do you know the guidelines for doing initial migrations?

I've discovered the solution. I have downloaded source code and used debugger. It appears that dump choice is not completely implemented.

public virtual Column[] GetColumns(string table)
{
    List<Column> columns = new List<Column>();
    using (
        IDataReader reader =
            ExecuteQuery(
                String.Format("select COLUMN_NAME, IS_NULLABLE from information_schema.columns where table_name = '{0}'", table)))
    {
        while (reader.Read())
        {
            Column column = new Column(reader.GetString(0), DbType.String);
            string nullableStr = reader.GetString(1);
            bool isNullable = nullableStr == "YES";
            column.ColumnProperty |= isNullable ? ColumnProperty.Null : ColumnProperty.NotNull;

            columns.Add(column);
        }
    }

    return columns.ToArray();
}

Database type is difficult coded. I'll just call sql script for my first migration. Related Problem is on the issue tracker