Skip to content

Instantly share code, notes, and snippets.

@ducfilan
Created December 28, 2018 02:35
Show Gist options
  • Save ducfilan/bc498b49104f031ce8631b953c6c7639 to your computer and use it in GitHub Desktop.
Save ducfilan/bc498b49104f031ce8631b953c6c7639 to your computer and use it in GitHub Desktop.
Entity Migration Table (__MigrationHistory) to Base64
declare @binaryContent varbinary(max);
select @binaryContent = Model
from [dbo].[__MigrationHistory]
where migrationId = '201810100357043_Name'
select cast('' as xml).value('xs:base64Binary(sql:variable("@binaryContent"))',
'varchar(max)') as base64Content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment