text: ﻿CREATE TABLE [GlobalConfiguration] (
      [Id] [int] NOT NULL IDENTITY,
      [SiteName] [nvarchar](4000) NOT NULL,
      [IssuerUri] [nvarchar](4000) NOT NULL,
      [IssuerContactEmail] [nvarchar](4000) NOT NULL,
      [DefaultWSTokenType] [nvarchar](4000) NOT NULL,
      [DefaultHttpTokenType] [nvarchar](4000) NOT NULL,
      [DefaultTokenLifetime] [int] NOT NULL,
      [MaximumTokenLifetime] [int] NOT NULL,
      [SsoCookieLifetime] [int] NOT NULL,
      [RequireEncryption] [bit] NOT NULL,
      [RequireRelyingPartyRegistration] [bit] NOT NULL,
      [EnableClientCertificateAuthentication] [bit] NOT NULL,
      [EnforceUsersGroupMembership] [bit] NOT NULL,
      [HttpPort] [int] NOT NULL,
      [HttpsPort] [int] NOT NULL,
      CONSTRAINT [PK_dbo.GlobalConfiguration] PRIMARY KEY ([Id])
  )
  CREATE TABLE [WSFederationConfiguration] (
      [Id] [int] NOT NULL IDENTITY,
      [Enabled] [bit] NOT NULL,
      [EnableAuthentication] [bit] NOT NULL,
      [EnableFederation] [bit] NOT NULL,
      [EnableHrd] [bit] NOT NULL,
      [AllowReplyTo] [bit] NOT NULL,
      [RequireReplyToWithinRealm] [bit] NOT NULL,
      [RequireSslForReplyTo] [bit] NOT NULL,
      CONSTRAINT [PK_dbo.WSFederationConfiguration] PRIMARY KEY ([Id])
  )
  CREATE TABLE [KeyMaterialConfiguration] (
      [Id] [int] NOT NULL IDENTITY,
      [SigningCertificateName] [nvarchar](4000),
      [DecryptionCertificateName] [nvarchar](4000),
      [RSASigningKey] [nvarchar](4000),
      [SymmetricSigningKey] [nvarchar](4000),
      CONSTRAINT [PK_dbo.KeyMaterialConfiguration] PRIMARY KEY ([Id])
  )
  CREATE TABLE [WSTrustConfiguration] (
      [Id] [int] NOT NULL IDENTITY,
      [Enabled] [bit] NOT NULL,
      [EnableMessageSecurity] [bit] NOT NULL,
      [EnableMixedModeSecurity] [bit] NOT NULL,
      [EnableClientCertificateAuthentication] [bit] NOT NULL,
      [EnableFederatedAuthentication] [bit] NOT NULL,
      [EnableDelegation] [bit] NOT NULL,
      CONSTRAINT [PK_dbo.WSTrustConfiguration] PRIMARY KEY ([Id])
  )
  CREATE TABLE [FederationMetadataConfiguration] (
      [Id] [int] NOT NULL IDENTITY,
      [Enabled] [bit] NOT NULL,
      CONSTRAINT [PK_dbo.FederationMetadataConfiguration] PRIMARY KEY ([Id])
  )
  CREATE TABLE [OAuth2Configuration] (
      [Id] [int] NOT NULL IDENTITY,
      [Enabled] [bit] NOT NULL,
      [EnableConsent] [bit] NOT NULL,
      [EnableResourceOwnerFlow] [bit] NOT NULL,
      [EnableImplicitFlow] [bit] NOT NULL,
      CONSTRAINT [PK_dbo.OAuth2Configuration] PRIMARY KEY ([Id])
  )
  CREATE TABLE [SimpleHttpConfiguration] (
      [Id] [int] NOT NULL IDENTITY,
      [Enabled] [bit] NOT NULL,
      CONSTRAINT [PK_dbo.SimpleHttpConfiguration] PRIMARY KEY ([Id])
  )
  CREATE TABLE [FacebookAccessTokenConfiguration] (
      [Id] [int] NOT NULL IDENTITY,
      [Enabled] [bit] NOT NULL,
      CONSTRAINT [PK_dbo.FacebookAccessTokenConfiguration] PRIMARY KEY ([Id])
  )
  CREATE TABLE [DiagnosticsConfiguration] (
      [Id] [int] NOT NULL IDENTITY,
      [EnableFederationMessageTracing] [bit] NOT NULL,
      CONSTRAINT [PK_dbo.DiagnosticsConfiguration] PRIMARY KEY ([Id])
  )
  CREATE TABLE [ClientCertificates] (
      [Id] [int] NOT NULL IDENTITY,
      [UserName] [nvarchar](4000) NOT NULL,
      [Thumbprint] [nvarchar](4000) NOT NULL,
      [Description] [nvarchar](4000) NOT NULL,
      CONSTRAINT [PK_dbo.ClientCertificates] PRIMARY KEY ([Id])
  )
  CREATE TABLE [Delegation] (
      [Id] [int] NOT NULL IDENTITY,
      [UserName] [nvarchar](4000) NOT NULL,
      [Realm] [nvarchar](4000) NOT NULL,
      [Description] [nvarchar](4000),
      CONSTRAINT [PK_dbo.Delegation] PRIMARY KEY ([Id])
  )
  CREATE TABLE [RelyingParties] (
      [Id] [int] NOT NULL IDENTITY,
      [Name] [nvarchar](4000) NOT NULL,
      [Enabled] [bit] NOT NULL,
      [Realm] [nvarchar](4000) NOT NULL,
      [TokenLifeTime] [int] NOT NULL,
      [ReplyTo] [nvarchar](4000),
      [EncryptingCertificate] [ntext],
      [SymmetricSigningKey] [nvarchar](4000),
      [ExtraData1] [nvarchar](4000),
      [ExtraData2] [nvarchar](4000),
      [ExtraData3] [nvarchar](4000),
      CONSTRAINT [PK_dbo.RelyingParties] PRIMARY KEY ([Id])
  )
  CREATE TABLE [IdentityProvider] (
      [ID] [int] NOT NULL IDENTITY,
      [Name] [nvarchar](4000) NOT NULL,
      [DisplayName] [nvarchar](4000) NOT NULL,
      [Type] [int] NOT NULL,
      [ShowInHrdSelection] [bit] NOT NULL,
      [WSFederationEndpoint] [nvarchar](4000),
      [IssuerThumbprint] [nvarchar](4000),
      [ClientID] [nvarchar](4000),
      [ClientSecret] [nvarchar](4000),
      [OAuth2ProviderType] [int],
      [Enabled] [bit] NOT NULL,
      CONSTRAINT [PK_dbo.IdentityProvider] PRIMARY KEY ([ID])
  )
  CREATE TABLE [Client] (
      [Id] [int] NOT NULL IDENTITY,
      [Name] [nvarchar](4000) NOT NULL,
      [Description] [nvarchar](4000) NOT NULL,
      [ClientId] [nvarchar](4000) NOT NULL,
      [ClientSecret] [nvarchar](4000) NOT NULL,
      [RedirectUri] [nvarchar](4000),
      [NativeClient] [bit] NOT NULL,
      [AllowImplicitFlow] [bit] NOT NULL,
      [AllowResourceOwnerFlow] [bit] NOT NULL,
      [AllowCodeFlow] [bit] NOT NULL,
      CONSTRAINT [PK_dbo.Client] PRIMARY KEY ([Id])
  )
  CREATE TABLE [__MigrationHistory] (
      [MigrationId] [nvarchar](255) NOT NULL,
      [Model] [image] NOT NULL,
      [ProductVersion] [nvarchar](32) NOT NULL,
      CONSTRAINT [PK_dbo.__MigrationHistory] PRIMARY KEY ([MigrationId])
  )
  INSERT INTO [__MigrationHistory] ([MigrationId], [Model], [ProductVersion]) VALUES ('201301011818314_InitialMigration', 0x1F8B0800000000000400ED5CDD72DBB612BEEFCC79078DEE6B39762E4E33723BAE65279E53C719D369AE61129231E15F09D2B19EAD177DA4BEC2014951040880F81168511EDF4904F8ED12582C168BDDFDF7EF7FE6BF3D47E1E409661825F1D9F4DDD1F17402633F0950BC3A9B16F9F2E7FF4E7FFBF53F3FCD2F83E879F267D3EFB4EC47DE8CF1D9F431CFD30FB319F61F6104F05184FC2CC1C9323FF2936806826476727CFCCBECDDBB19241053823599CCEF8A384711ACFE90BF1749ECC3342F4078930430C49BE7A4C5AB50279F4104710A7C7836BD7F44F1F71CFA7991C1A3EB0012A07CEDC18C7CC3D11D4C138CF22443101F797F85D3C9798800E1D183E1723A49DF7FF88AA1976749BCF252902310DEAF5348DA9720C470F3451FD2F7BA1F757C527ED40CC4719213B824B61A94E9F673C9075F56DF53B2557DF4D9F463983C80908CD012AD8AACA642BD405EF91F5C330FC8A32F5992C22C5FDFC1E506E63A984E66EC7BB3EE8BDBD7A8774A4EC8AF383F3D994E3E1761081E42B81D3032A21E196EF811C690F006832F20CF611697EFD633C351EDD0F0500ECB5F0D25323B44F4A6932BF40C833F60BCCA1FB7D46EC073F3E4FDF13191C0AF3122A24ADECAB3020AD8EB277D8D7101B3AF19DA1B6D32AB39F0F3CB08A0700F4C2CE0121461FECDBB4FBEC3B824BF3F263E91053302362A16FE404B58AA2795F4F72312065154440E113D9C5C24C97704DDC0DDC1BF0A94C1CBD8CFD669ADBD6AB8DF93248420B605BC83E19A4CDB175029A015C2F9466DED087F19979D2F424434CB05798E96C8273AE7BCC81F4B5DE33B22B24C321F927D22C31FB3A4486F60F4407E3FA27457E852C4BF2459BEDBAC9528D814663E6BF795DEDDE69B77050358CFD7ABDD736A410ADCC8A36BF12B3BB773E006EF53B6F3C79E8761F283D857E1FA3E71A6272AB46F282726DD1D0461E408D8C3E155925931ABBD50881CDF10E1CBD0ABB6CD563151E494AE756FA9D5FF557B73B343ED9D953BEF7C332A64825E9EBCB78E2248A8F92FC784C1D6719F15387FB5ABC1E9AE710331062BE841BFC82ADA4E40CBA92F4FD06E6107B7B8A82D0F0643802F6008571678DAB2DF6ED837300701C8C1DB32B01AC8DB72FA4FDE064F6B5D26312664DD80DD419C14E4E073FB837CDB15B1F5DCC05E4769887C949B236A8B8C87080D581E8BDEC4C66A001708ACE20413958B5FF908D26ABADA7FEF33E05756D32003CB6D9CF8350D69E922D993E7F6FEB1881E52422EDF03F105C47E861887D960D4F5D7706BE1BC89988B5966FC11AF41BA7638D9510E5DF4BA74D89E84CB9119B82F19DD5E69DC3BB883609C742FE749696E3D18F796211BE4E7E1F9730443F19C676041CEACEFF648FB648FB44F47A3691BBD45387D42C456B5D2B50B0B5DBB78B5BA7681701A82F5BE2C55EA36DBF2D2F731F9711D7FCA028F9878BE0B9F187DC777190769E2DC8ED6597D7504C45096BC0E07F5F1AC15FD97A6EC413F837BF8EEDAC7D6A8985E09D5DB4987744ED443F566738EF760A1457DB3D682BD911E62B1695AB801CA88E2761E67A6B3363F1325FFB4B9C071120160EFCF95861438F63B57A81764C45CBB9CAB603D44B8ECD86A75EC29E3392DBBC2E7AED6BADC74CF7B223B272D0775D4EA91B0D7AC1F99DEE10590F2201F1530D19F5800280D8650335ADD190B7914DC26ABE0F86B3801B2EAAE4E45A4DE3E05C0A2BB2B15587B79210094DD6CA8402987BE0055EAEE57C10ADCD93CBAA8938A5DEA7696E7966A54E074DC543C56B78302AF7B181341720736BD41948F9C58236D75CFB66D3EAB43E3370FE633490CFDFC06A429F9682AA67EF364E2D501F5173F7BE661EB518D31F3B1207A7DCBED9612B198C00A765A09E9524DA30CE7E529FC0194FAF82288B86EF69AB66140AE70BB76643B2DCDBBE5EFE6DA413FF540A8B73BC4DAB9B822C31311BC6AA4E0967D2D962B1CCF0721C804D6EC451216512CB388FBDE6E23F3698CF6A93E121568CFB0D33E36C56203E77950B65D1F5D14114FA38BDA8DD13BA1EE02FC4E0F630A9D987301854E0F7D0AE2A8769A82B88781DCF151EE8C00F2CDFAD88290771A5BD06C8C2D8F7E17509277D6A7AB19A44553D77CC584879EA87996724F477D7A6D283D0DDE3E3543C262282CC39ACF3A6ABBBB89CCB85DA4E387E86E505ADB1763D50FB66F696600544455BB9701D6307BD8D637C54BBF058E7A49EDB282BA81FF3C3ADD6A8A5CA500F090D5637D2C360B8086635B2CB4269F0B20D4977C37635A9DF40001994E8FD16880EAF83DD8CAD74B69A868AA16BE3ED450B6AB387381B564C57D4CAC2D695E026B7249BB19C82E9B78C0082DDB64304AA2DB676688441D46B31A1AE7D1805BA12AA3A1A2A7DE0575600E6103E4B2167854AE8B310D3E89414085EF746806736FD28374EFE7BB9AD2A41D6A3C19B9BBADC2DDCF4217B875075BF346991C1569D5F237461C8726D8D35C6FBCEB83CDAF32C1446B4EB550C6318F0A2DD8E49008B45DD3648A29B8D2E3D1059D4CE9B077913C09B67D34124E5DF90C26E55A3931154995A46B238D43DAF734A7F48DDB6093AA97A7A335ABFA50434EAB3C1DA7CFF7D1ED3B1A2150A5FBB89405352D0D29D0011966FEDBC40E1AA37DAA8F440710D258F47393133D1524C59EE1A986D1489C2CEBC7A9D691D2D0D1333D2F8F5DB2845E48438FE381C9535FA28F4B99EAA7A321572A8061648B972B53997265BCBB90CD4E160FA33CD92613BE844E75E35B0149760E3B6AC22E2FEFFD947E039556C3304E3DB7403B91A09D58A19D4AD04E47A495F838ACC114537FFE4D454BA59AD41052E5B4E828272E91A7EFEDDD95139329C36C5674838182E1C25B4CC35944B92FCC0A15B4EBA38BF360687C710FD360259989CAB7EA23B7B92B3462FBD414A9098FE7D19A167D44517E098D2B6A7F751E8126CE73E013A0F5A9EF706C265B1B5AB17402E1D231FA36F74B874916616D28AAC164F4E9FC0F7616E816C30810B9E755D06C1C5DD2EB3D96F531A4D2268870E06DD30B2B132ED8BBDB654B7DF364FB7F1BECBD09B4565751E722AFEB2ED349A3964BF317E7303A2A3B940A67137C0D8FDE97B5DF9B6E372026C7045CC7939E4DAB36A6E6BA453DF419C641780045D1AB2D5B990C689AEEDBA9871E3F81CC7F049920336CD772E7AEA145D5CCDDD190172B774E43588BDC39156161F04AA61C161AB7C1939619B7019316197F40D660AA02E336D046A52EED08280B8BDBC0768B8ADBCC1157525C0D728805C507D1D79DEC777BD1732969DD60E15DB1A8FAE13620A2DAE13B2D7F59DDF01D408535C3D57807582F7C20B3A5AF54B8D6DEE9A412B8334AC242DFCED07BEA3E59D238B032DDE3D6C592EADC3B00CA2A738FD454E98D38DD1598AFC6ED50CF8EAE12F73824FDB00A708F63CCA42B8FADBB6D0F24AD7D620F29AACFE2503A46536B7B1C12728025B6071C3855756D87E33986CADA838C64B7E2B13BAF135F69CFA5478BAB2D660B7E1015AF0F6CEA9933F2FE67FD802B510F32F1C34CBA03736720B911968FB6F32D33DE1A67A7F3DEDAD075BDA1BD9FF7055C73659CDD439F0C077DFA523A64FF35960F488B08AA273B5404D4F59AD54595B434B28DB6EB2B8BEC4CDC65558F9D11E81635760CCC965175062E2F49DC910B8B82C4CE8F1D6F66C7CB1C05A4C21D0C856C21DDB635809D2D1D51895FEB4B3A3BF791F4C6CFA17B4B58D677D7A5DD2DE9CBD7A36479DA066FF584216956F0ADE3ADCEA6C14369BFD6FCEF5AEA57C5484F5F113B3B950996D403E678927715B1B46BA161F50889BA8907C7497D621543CA3744BCB9A970AC624DD84BC4CE6E7591556C487B8A5871505159C58FBCAB88A1972FC62CE262C8A2CDC2AF1EB0A8B388DE8E859FB5EA3E8BE85A5687EE290E2D9F3DF1BEA751389A8F199ECFEE8AB80CFCABFF11930EAD5A8839C18CEBE3560BDAF4B98E9749B37393CFA2396ABA74A317372AEABC143EE0E7A4D9871857F7067F82B0280DFAE80106D7F16D91A7457E8E318C1E4226156F3EEBA75F55C766799EDF56362A76F109844D443E01DEC6BF17280CB67C5F09EC11094469796C6C7BC295570634C2D57A8BF43989358136C3B780298C4BE9BB8744E3952BFA36F6C01394F3A61E4376C4E6A5EACA40843718EDFBE42F11BF207AFEF5FF1F04F0F2618C0000, '5.0.0.net45')
  