-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes field 'ChannelId' from YTS videos
- Loading branch information
Showing
7 changed files
with
158 additions
and
13 deletions.
There are no files selected for viewing
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
92 changes: 92 additions & 0 deletions
92
...odels/Migrations/DataLakeYouTubeStudio/20220222210844_RemoveChannelIdYTSVideo.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
63 changes: 63 additions & 0 deletions
63
DataLakeModels/Migrations/DataLakeYouTubeStudio/20220222210844_RemoveChannelIdYTSVideo.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,63 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
namespace DataLakeModels.Migrations.DataLakeYouTubeStudio | ||
{ | ||
public partial class RemoveChannelIdYTSVideo : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropPrimaryKey( | ||
name: "PK_Videos", | ||
schema: "youtube_studio_v1", | ||
table: "Videos"); | ||
|
||
migrationBuilder.DropColumn( | ||
name: "ChannelId", | ||
schema: "youtube_studio_v1", | ||
table: "Videos"); | ||
|
||
migrationBuilder.AlterColumn<DateTime>( | ||
name: "UpdateDate", | ||
schema: "youtube_studio_v1", | ||
table: "Groups", | ||
nullable: true, | ||
oldClrType: typeof(DateTime)); | ||
|
||
migrationBuilder.AddPrimaryKey( | ||
name: "PK_Videos", | ||
schema: "youtube_studio_v1", | ||
table: "Videos", | ||
columns: new[] { "VideoId", "ValidityStart", "Metric", "EventDate" }); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropPrimaryKey( | ||
name: "PK_Videos", | ||
schema: "youtube_studio_v1", | ||
table: "Videos"); | ||
|
||
migrationBuilder.AddColumn<string>( | ||
name: "ChannelId", | ||
schema: "youtube_studio_v1", | ||
table: "Videos", | ||
nullable: false, | ||
defaultValue: ""); | ||
|
||
migrationBuilder.AlterColumn<DateTime>( | ||
name: "UpdateDate", | ||
schema: "youtube_studio_v1", | ||
table: "Groups", | ||
nullable: false, | ||
oldClrType: typeof(DateTime), | ||
oldNullable: true); | ||
|
||
migrationBuilder.AddPrimaryKey( | ||
name: "PK_Videos", | ||
schema: "youtube_studio_v1", | ||
table: "Videos", | ||
columns: new[] { "ChannelId", "VideoId", "ValidityStart", "Metric", "EventDate" }); | ||
} | ||
} | ||
} |
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