O rollback so executa se eu fizer update da migration anterior, se eu executar o update-database duas vezes na mesma migration ele nao aciona o rollback.
migration de unidade (no projeto ha 3 migration, inicial, unidade e compras, o log abaixo é relacionado a segunda migration), quando ocorre o rollback.
PM> update-database 20190115133153_Unidade
Executed DbCommand (67ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT OBJECT_ID(N'__EFMigrationsHistory');
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT OBJECT_ID(N'__EFMigrationsHistory');
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT [MigrationId], [ProductVersion]
FROM [__EFMigrationsHistory]
ORDER BY [MigrationId];
Reverting migration '20190115141738_Compra'.
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
DROP TABLE [Compras];
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
DELETE FROM [__EFMigrationsHistory]
WHERE [MigrationId] = N'20190115141738_Compra';
Done.
Log quando eu executo novamente a migration unidade.
PM> update-database 20190115133153_Unidade
Executed DbCommand (67ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT OBJECT_ID(N'__EFMigrationsHistory');
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT OBJECT_ID(N'__EFMigrationsHistory');
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT [MigrationId], [ProductVersion]
FROM [__EFMigrationsHistory]
ORDER BY [MigrationId];
Done.
PM>