From 5da0edb4127c581f1d0a36bbdb2ee1522157aa05 Mon Sep 17 00:00:00 2001
From: Kyle Spearrin <kyle.spearrin@gmail.com>
Date: Mon, 25 Mar 2019 15:59:12 -0400
Subject: [PATCH] include bit. namespace prefix

---
 util/Migrator/DbMigrator.cs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/util/Migrator/DbMigrator.cs b/util/Migrator/DbMigrator.cs
index 5581818cc2..3067cd1d74 100644
--- a/util/Migrator/DbMigrator.cs
+++ b/util/Migrator/DbMigrator.cs
@@ -46,17 +46,19 @@ namespace Bit.Migrator
                 command.ExecuteNonQuery();
             }
 
+            cancellationToken.ThrowIfCancellationRequested();
             using(var connection = new SqlConnection(_connectionString))
             {
                 // Rename old migration scripts to new namespace.
                 var command = new SqlCommand(
                     "IF OBJECT_ID('Migration','U') IS NOT NULL " +
                     "UPDATE [dbo].[Migration] SET " +
-                    "[ScriptName] = REPLACE([ScriptName], '.Setup.', '.Migrator.');", connection);
+                    "[ScriptName] = REPLACE([ScriptName], 'Bit.Setup.', 'Bit.Migrator.');", connection);
                 command.Connection.Open();
                 command.ExecuteNonQuery();
             }
 
+            cancellationToken.ThrowIfCancellationRequested();
             var builder = DeployChanges.To
                 .SqlDatabase(_connectionString)
                 .JournalToSqlTable("dbo", "Migration")
@@ -92,6 +94,7 @@ namespace Bit.Migrator
                 }
             }
 
+            cancellationToken.ThrowIfCancellationRequested();
             return result.Successful;
         }
     }