Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Contrib][T4][SQL Server] Fix ForeignKey order definition

  • Loading branch information...
commit b6cb12d4dfddc3981279008131f90965a0386a92 1 parent 0709d10
@spaccabit authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/FluentMigrator.T4/SchemaReaders/SqlServerSchemaReader.cs
View
3  src/FluentMigrator.T4/SchemaReaders/SqlServerSchemaReader.cs
@@ -335,7 +335,8 @@ FROM INFORMATION_SCHEMA.COLUMNS
WHERE
(FK.CONSTRAINT_TYPE = 'FOREIGN KEY')
AND (FK.TABLE_NAME=@tableName)
- AND (FK.TABLE_SCHEMA=@schemaName)";
+ AND (FK.TABLE_SCHEMA=@schemaName)
+ ORDER BY ForeignConstraintName, ForeignTableSchema, ForeignTable, FKC.ORDINAL_POSITION";
}
public static class DbDataReaderExtensions
Please sign in to comment.
Something went wrong with that request. Please try again.