diff options
Diffstat (limited to 'projecttemplates/RelyingPartyDatabase')
21 files changed, 425 insertions, 22 deletions
diff --git a/projecttemplates/RelyingPartyDatabase/Properties/Database.sqlcmdvars b/projecttemplates/RelyingPartyDatabase/Properties/Database.sqlcmdvars index a396dc9..f2c472d 100644 --- a/projecttemplates/RelyingPartyDatabase/Properties/Database.sqlcmdvars +++ b/projecttemplates/RelyingPartyDatabase/Properties/Database.sqlcmdvars @@ -4,7 +4,7 @@ <Properties> <Property> <PropertyName>Path1</PropertyName> - <PropertyValue>WEBROOT\App_Data\</PropertyValue> + <PropertyValue>WEBROOT</PropertyValue> </Property> </Properties> </SqlCommandVariables>
\ No newline at end of file diff --git a/projecttemplates/RelyingPartyDatabase/RelyingPartyDatabase.dbproj b/projecttemplates/RelyingPartyDatabase/RelyingPartyDatabase.dbproj index 8163828..9ffe9cf 100644 --- a/projecttemplates/RelyingPartyDatabase/RelyingPartyDatabase.dbproj +++ b/projecttemplates/RelyingPartyDatabase/RelyingPartyDatabase.dbproj @@ -6,7 +6,7 @@ <SchemaVersion>2.0</SchemaVersion> <ProjectVersion>4.0</ProjectVersion> <ProjectGuid>{2b4261ac-25ac-4b8d-b459-1c42b6b1401d}</ProjectGuid> - <DSP>Microsoft.Data.Schema.Sql.Sql100DatabaseSchemaProvider</DSP> + <DSP>Microsoft.Data.Schema.Sql.Sql90DatabaseSchemaProvider</DSP> <AppDesignerFolder>Properties</AppDesignerFolder> <ShowWizard>True</ShowWizard> <OutputType>Database</OutputType> @@ -284,4 +284,39 @@ <ItemGroup> <BuildContributorArgument Include="OutDir=$(OutDir)" /> </ItemGroup> + <ItemGroup> + <NotInBuild Include="Schema Comparisons\SchemaComparison1.scmp"> + <SubType>NotInBuild</SubType> + </NotInBuild> + </ItemGroup> + <ItemGroup> + <Build Include="Schema Objects\Schemas\dbo\Tables\Constraints\DF_IssuedToken_CreatedOn_1.defconst.sql"> + <SubType>Code</SubType> + </Build> + <Build Include="Schema Objects\Schemas\dbo\Tables\Keys\FK_IssuedToken_Consumer_1.fkey.sql"> + <SubType>Code</SubType> + </Build> + <Build Include="Schema Objects\Schemas\dbo\Tables\Keys\FK_IssuedToken_User_1.fkey.sql"> + <SubType>Code</SubType> + </Build> + <Build Include="Schema Objects\Schemas\dbo\Tables\Indexes\IX_Consumer_1.index.sql"> + <SubType>Code</SubType> + </Build> + <Build Include="Schema Objects\Schemas\dbo\Tables\Keys\PK_IssuedToken_1.pkey.sql"> + <SubType>Code</SubType> + </Build> + <Build Include="Schema Objects\Schemas\dbo\Tables\Keys\PK_Consumer_1.pkey.sql"> + <SubType>Code</SubType> + </Build> + <Build Include="Schema Objects\Schemas\dbo\Tables\ClientAuthorization.table.sql"> + <SubType>Code</SubType> + <AnsiNulls>On</AnsiNulls> + <QuotedIdentifier>On</QuotedIdentifier> + </Build> + <Build Include="Schema Objects\Schemas\dbo\Tables\Client.table.sql"> + <SubType>Code</SubType> + <AnsiNulls>On</AnsiNulls> + <QuotedIdentifier>On</QuotedIdentifier> + </Build> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/projecttemplates/RelyingPartyDatabase/Schema Comparisons/SchemaComparison1.scmp b/projecttemplates/RelyingPartyDatabase/Schema Comparisons/SchemaComparison1.scmp new file mode 100644 index 0000000..b3160a4 --- /dev/null +++ b/projecttemplates/RelyingPartyDatabase/Schema Comparisons/SchemaComparison1.scmp @@ -0,0 +1,328 @@ +<?xml version="1.0" encoding="utf-8"?> +<SchemaComparison> + <Version>1</Version> + <SourceModelProvider> + <ConnectionBasedModelProvider> + <ConnectionString>Data Source=.\sqlexpress;Initial Catalog=RelyingPartyDatabase;Integrated Security=True;Password=</ConnectionString> + <DatabaseName>RelyingPartyDatabase</DatabaseName> + <DspFamilyName>sql</DspFamilyName> + <Name>[THINKAGAIN\sqlexpress.RelyingPartyDatabase]</Name> + </ConnectionBasedModelProvider> + </SourceModelProvider> + <TargetModelProvider> + <ProjectBasedModelProvider> + <ProjectGuid>{2b4261ac-25ac-4b8d-b459-1c42b6b1401d}</ProjectGuid> + <Name>RelyingPartyDatabase</Name> + </ProjectBasedModelProvider> + </TargetModelProvider> + <SchemaCompareSettingsService> + <SchemaCompareSettingsService> + <PropertyElementName> + <Name>Version</Name> + <Value>1</Value> + </PropertyElementName> + </SchemaCompareSettingsService> + <ConfigurationOptionsElement> + <PropertyElementName> + <Name>PlanGenerationType</Name> + <Value>Sql90SchemaDeploymentOptions</Value> + </PropertyElementName> + <PropertyElementName> + <Name>DoNotUseAlterAssemblyStatementsToUpdateCLRTypes</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>DisableAndReenableDdlTriggers</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreDdlTriggerOrder</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreDdlTriggerState</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreObjectPlacementOnPartitionScheme</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreAuthorizer</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreDefaultSchema</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreRouteLifetime</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>OnlyCompareElementsInSource</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreStatisticsSample</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>CommentOutSetVarDeclarations</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>GenerateDeployStateChecks</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>DeployDatabaseProperties</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreComments</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreWhitespace</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreKeywordCasing</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreSemicolonBetweenStatements</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>BlockIncrementalDeploymentIfDataLoss</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>PerformDatabaseBackup</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>SingleUserMode</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IncludeTransactionalScripts</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>EnforceMinimalDependencies</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>DeploymentCollationPreference</Name> + <Value>UseSourceModelCollation</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnorePartitionSchemes</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreWithNocheckOnCheckConstraints</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreWithNocheckOnForeignKeys</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreIdentitySeed</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreIncrement</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreFillFactor</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreIndexPadding</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreColumnCollation</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreLockHintsOnIndexes</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreTableOptions</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreIndexOptions</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreDmlTriggerOrder</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>ScriptDatabaseCollation</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreDmlTriggerState</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreAnsiNulls</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreQuotedIdentifiers</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreUserSettingsObjects</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>AbortOnFirstError</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreFilegroupPlacement</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreFullTextCatalogFilePath</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreFileAndLogFilePath</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreLoginSids</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreNotForReplication</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreFileSize</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>OverrideSevenSetOptions</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>SetAnsiNulls</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>SetAnsiPadding</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>SetAnsiWarnings</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>SetArithAbort</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>SetConcatNullYieldsNull</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>SetQuotedIdentifier</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>SetNumericRoundAbort</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>UnmodifiableObjectWarnings</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>DropIndexesNotInSource</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>DropConstraintsNotInSource</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>CheckNewConstraints</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreColumnOrder</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnorePasswords</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>IgnoreBodyDependencies</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>SourceSqlCmdVariablesFile</Name> + <Value>C:\Users\andarno\git\dotnetopenid\projecttemplates\RelyingPartyDatabase\Properties\Database.sqlcmdvars</Value> + </PropertyElementName> + <PropertyElementName> + <Name>AlwaysCreateNewDatabase</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>GenerateDropsIfNotInProject</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>TargetDatabaseName</Name> + <Value>RelyingPartyDatabase</Value> + </PropertyElementName> + <PropertyElementName> + <Name>TargetConnectionString</Name> + <Value>Data Source=.\sqlexpress;Initial Catalog=RelyingPartyDatabase;Integrated Security=True;Pooling=False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>VerifyDeployment</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>TreatVerificationErrorsAsWarnings</Name> + <Value>False</Value> + </PropertyElementName> + <PropertyElementName> + <Name>BuildtimeContributorsMustExist</Name> + <Value>True</Value> + </PropertyElementName> + <PropertyElementName> + <Name>Microsoft.Data.Schema.Sql.SchemaModel.ISqlPermissionStatement</Name> + <Value>ExcludedType</Value> + </PropertyElementName> + <PropertyElementName> + <Name>Microsoft.Data.Schema.Sql.SchemaModel.ISqlFilegroup</Name> + <Value>ExcludedType</Value> + </PropertyElementName> + <PropertyElementName> + <Name>Microsoft.Data.Schema.Sql.SchemaModel.ISqlFile</Name> + <Value>ExcludedType</Value> + </PropertyElementName> + <PropertyElementName> + <Name>Microsoft.Data.Schema.Sql.SchemaModel.ISqlExtendedProperty</Name> + <Value>ExcludedType</Value> + </PropertyElementName> + </ConfigurationOptionsElement> + </SchemaCompareSettingsService> +</SchemaComparison>
\ No newline at end of file diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Client.table.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Client.table.sql new file mode 100644 index 0000000..8dc2f64 --- /dev/null +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Client.table.sql @@ -0,0 +1,12 @@ +CREATE TABLE [dbo].[Client] ( + [ClientId] INT IDENTITY (1, 1) NOT NULL, + [ClientIdentifier] VARCHAR (255) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL, + [ClientSecret] VARCHAR (255) COLLATE SQL_Latin1_General_CP1_CS_AS NULL, + [Callback] VARCHAR (2048) NULL, + [Name] NVARCHAR (50) NOT NULL +); + + + + + diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/ClientAuthorization.table.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/ClientAuthorization.table.sql new file mode 100644 index 0000000..3a31062 --- /dev/null +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/ClientAuthorization.table.sql @@ -0,0 +1,9 @@ +CREATE TABLE [dbo].[ClientAuthorization] ( + [AuthorizationId] INT IDENTITY (1, 1) NOT NULL, + [ClientId] INT NOT NULL, + [UserId] INT NOT NULL, + [CreatedOn] DATETIME NOT NULL, + [ExpirationDate] DATETIME NULL, + [Scope] VARCHAR (2048) NULL +); + diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_CreatedOn.defconst.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_CreatedOn.defconst.sql index c60323f..28f59be 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_CreatedOn.defconst.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_CreatedOn.defconst.sql @@ -1,3 +1,3 @@ -ALTER TABLE [dbo].[IssuedToken] - ADD CONSTRAINT [DF_IssuedToken_CreatedOn] DEFAULT (getutcdate()) FOR [CreatedOn]; +/*ALTER TABLE [dbo].[IssuedToken] + ADD CONSTRAINT [DF_IssuedToken_CreatedOn] DEFAULT (getutcdate()) FOR [CreatedOn];*/ diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_CreatedOn_1.defconst.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_CreatedOn_1.defconst.sql new file mode 100644 index 0000000..3ba2b0b --- /dev/null +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_CreatedOn_1.defconst.sql @@ -0,0 +1,3 @@ +ALTER TABLE [dbo].[ClientAuthorization] + ADD CONSTRAINT [DF_IssuedToken_CreatedOn] DEFAULT (getutcdate()) FOR [CreatedOn]; + diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_IsAccessToken.defconst.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_IsAccessToken.defconst.sql index 2e9e5fd..cf3ec08 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_IsAccessToken.defconst.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Constraints/DF_IssuedToken_IsAccessToken.defconst.sql @@ -1,3 +1,3 @@ -ALTER TABLE [dbo].[IssuedToken] - ADD CONSTRAINT [DF_IssuedToken_IsAccessToken] DEFAULT ((0)) FOR [IsAccessToken]; +/*ALTER TABLE [dbo].[IssuedToken] + ADD CONSTRAINT [DF_IssuedToken_IsAccessToken] DEFAULT ((0)) FOR [IsAccessToken];*/ diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Consumer.table.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Consumer.table.sql index 8549a78..ab14759 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Consumer.table.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Consumer.table.sql @@ -1,4 +1,4 @@ -CREATE TABLE [dbo].[Consumer] ( +/*CREATE TABLE [dbo].[Consumer] ( [ConsumerId] INT IDENTITY (1, 1) NOT NULL, [ConsumerKey] NVARCHAR (255) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL, [ConsumerSecret] NVARCHAR (255) COLLATE SQL_Latin1_General_CP1_CS_AS NULL, @@ -7,5 +7,5 @@ [VerificationCodeFormat] INT NOT NULL, [VerificationCodeLength] INT NOT NULL, [Name] NVARCHAR (50) NULL -); +);*/ diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_Consumer.index.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_Consumer.index.sql index 149ae35..d469e71 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_Consumer.index.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_Consumer.index.sql @@ -1,3 +1,3 @@ -CREATE UNIQUE NONCLUSTERED INDEX [IX_Consumer] - ON [dbo].[Consumer]([ConsumerKey] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF, ONLINE = OFF, MAXDOP = 0); +/*CREATE UNIQUE NONCLUSTERED INDEX [IX_Consumer] + ON [dbo].[Consumer]([ConsumerKey] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF, ONLINE = OFF, MAXDOP = 0);*/ diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_Consumer_1.index.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_Consumer_1.index.sql new file mode 100644 index 0000000..e5ad21b --- /dev/null +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_Consumer_1.index.sql @@ -0,0 +1,4 @@ +CREATE UNIQUE NONCLUSTERED INDEX [IX_Consumer] + ON [dbo].[Client]([ClientIdentifier] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF, ONLINE = OFF, MAXDOP = 0) + ON [PRIMARY]; + diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_IssuedToken.index.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_IssuedToken.index.sql index 5bc3a53..f2f59e1 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_IssuedToken.index.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Indexes/IX_IssuedToken.index.sql @@ -1,3 +1,3 @@ -CREATE UNIQUE NONCLUSTERED INDEX [IX_IssuedToken] - ON [dbo].[IssuedToken]([Token] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF, ONLINE = OFF, MAXDOP = 0); +/*CREATE UNIQUE NONCLUSTERED INDEX [IX_IssuedToken] + ON [dbo].[IssuedToken]([Token] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF, ONLINE = OFF, MAXDOP = 0);*/ diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/IssuedToken.table.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/IssuedToken.table.sql index 8882e93..ee0ffdf 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/IssuedToken.table.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/IssuedToken.table.sql @@ -1,4 +1,4 @@ -CREATE TABLE [dbo].[IssuedToken] ( +/*CREATE TABLE [dbo].[IssuedToken] ( [IssuedTokenId] INT IDENTITY (1, 1) NOT NULL, [ConsumerId] INT NOT NULL, [UserId] INT NULL, @@ -11,5 +11,5 @@ [ExpirationDate] DATETIME NULL, [IsAccessToken] BIT NOT NULL, [Scope] NVARCHAR (255) NULL -); +);*/ diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_Consumer.fkey.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_Consumer.fkey.sql index a5b3dac..fe25092 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_Consumer.fkey.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_Consumer.fkey.sql @@ -1,3 +1,3 @@ -ALTER TABLE [dbo].[IssuedToken] - ADD CONSTRAINT [FK_IssuedToken_Consumer] FOREIGN KEY ([ConsumerId]) REFERENCES [dbo].[Consumer] ([ConsumerId]) ON DELETE CASCADE ON UPDATE CASCADE; +/*ALTER TABLE [dbo].[IssuedToken] + ADD CONSTRAINT [FK_IssuedToken_Consumer] FOREIGN KEY ([ConsumerId]) REFERENCES [dbo].[Consumer] ([ConsumerId]) ON DELETE CASCADE ON UPDATE CASCADE;*/ diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_Consumer_1.fkey.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_Consumer_1.fkey.sql new file mode 100644 index 0000000..062b9d7 --- /dev/null +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_Consumer_1.fkey.sql @@ -0,0 +1,3 @@ +ALTER TABLE [dbo].[ClientAuthorization] + ADD CONSTRAINT [FK_IssuedToken_Consumer] FOREIGN KEY ([ClientId]) REFERENCES [dbo].[Client] ([ClientId]) ON DELETE CASCADE ON UPDATE CASCADE; + diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_User.fkey.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_User.fkey.sql index 045a694..3b9bbc1 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_User.fkey.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_User.fkey.sql @@ -1,3 +1,3 @@ -ALTER TABLE [dbo].[IssuedToken] - ADD CONSTRAINT [FK_IssuedToken_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([UserId]) ON DELETE CASCADE ON UPDATE CASCADE; +/*ALTER TABLE [dbo].[IssuedToken] + ADD CONSTRAINT [FK_IssuedToken_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([UserId]) ON DELETE CASCADE ON UPDATE CASCADE;*/ diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_User_1.fkey.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_User_1.fkey.sql new file mode 100644 index 0000000..e32b291 --- /dev/null +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/FK_IssuedToken_User_1.fkey.sql @@ -0,0 +1,3 @@ +ALTER TABLE [dbo].[ClientAuthorization] + ADD CONSTRAINT [FK_IssuedToken_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([UserId]) ON DELETE CASCADE ON UPDATE CASCADE; + diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_Consumer.pkey.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_Consumer.pkey.sql index edde20f..181fdf5 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_Consumer.pkey.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_Consumer.pkey.sql @@ -1,3 +1,3 @@ -ALTER TABLE [dbo].[Consumer] - ADD CONSTRAINT [PK_Consumer] PRIMARY KEY CLUSTERED ([ConsumerId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF); +/*ALTER TABLE [dbo].[Consumer] + ADD CONSTRAINT [PK_Consumer] PRIMARY KEY CLUSTERED ([ConsumerId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF);*/ diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_Consumer_1.pkey.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_Consumer_1.pkey.sql new file mode 100644 index 0000000..04c039f --- /dev/null +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_Consumer_1.pkey.sql @@ -0,0 +1,3 @@ +ALTER TABLE [dbo].[Client] + ADD CONSTRAINT [PK_Consumer] PRIMARY KEY CLUSTERED ([ClientId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF); + diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_IssuedToken.pkey.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_IssuedToken.pkey.sql index e2f95ef..931fa54 100644 --- a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_IssuedToken.pkey.sql +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_IssuedToken.pkey.sql @@ -1,3 +1,3 @@ -ALTER TABLE [dbo].[IssuedToken] - ADD CONSTRAINT [PK_IssuedToken] PRIMARY KEY CLUSTERED ([IssuedTokenId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF); +/*ALTER TABLE [dbo].[IssuedToken] + ADD CONSTRAINT [PK_IssuedToken] PRIMARY KEY CLUSTERED ([IssuedTokenId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF);*/ diff --git a/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_IssuedToken_1.pkey.sql b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_IssuedToken_1.pkey.sql new file mode 100644 index 0000000..dcd7edc --- /dev/null +++ b/projecttemplates/RelyingPartyDatabase/Schema Objects/Schemas/dbo/Tables/Keys/PK_IssuedToken_1.pkey.sql @@ -0,0 +1,3 @@ +ALTER TABLE [dbo].[ClientAuthorization] + ADD CONSTRAINT [PK_IssuedToken] PRIMARY KEY CLUSTERED ([AuthorizationId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF); + |