-
Notifications
You must be signed in to change notification settings - Fork 642
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8047 from NuGet/dev
[ReleasePrep][2020.06.15]RI of dev into master
- Loading branch information
Showing
14 changed files
with
411 additions
and
40 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
src/NuGetGallery/Migrations/202006011927336_AddIndexToPackageDependencies.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
src/NuGetGallery/Migrations/202006011927336_AddIndexToPackageDependencies.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
namespace NuGetGallery.Migrations | ||
{ | ||
using System.Data.Entity.Migrations; | ||
|
||
public partial class AddIndexToPackageDependencies : DbMigration | ||
{ | ||
public override void Up() | ||
{ | ||
// "WITH (ONLINE = ON)" is not supported on all editions of SQL Server. We want to create the index in the background | ||
// when we are deploying to our live environment on Azure (which supports online index creation). | ||
// Editions: https://docs.microsoft.com/en-us/sql/t-sql/functions/serverproperty-transact-sql?view=sql-server-ver15#arguments | ||
// We used sp_executesql because it is blocked on SQL that does not support "WITH (ONLINE = ON)". | ||
Sql(@"IF SERVERPROPERTY ('edition') = 'SQL Azure' | ||
BEGIN | ||
EXECUTE sp_executesql N'CREATE NONCLUSTERED INDEX [IX_PackageDependencies_Id] ON [dbo].[PackageDependencies] ([Id]) | ||
INCLUDE ([PackageKey]) | ||
WITH (ONLINE = ON)' | ||
END | ||
ELSE | ||
BEGIN | ||
CREATE NONCLUSTERED INDEX [IX_PackageDependencies_Id] ON [dbo].[PackageDependencies] ([Id]) | ||
INCLUDE ([PackageKey]) | ||
END"); | ||
} | ||
|
||
public override void Down() | ||
{ | ||
DropIndex(table: "PackageDependencies", name: "IX_PackageDependencies_Id"); | ||
} | ||
} | ||
} |
126 changes: 126 additions & 0 deletions
126
src/NuGetGallery/Migrations/202006011927336_AddIndexToPackageDependencies.resx
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -654,4 +654,4 @@ | |
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> | ||
</configuration> |
Oops, something went wrong.