Fix Content urls to 1024
This commit is contained in:
@@ -0,0 +1,390 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Hutopy.Web.Features.Contents.Data.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class EnsureUrlsAre1024Chars : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "YoutubeUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(255)",
|
||||
oldMaxLength: 255,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "XUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(255)",
|
||||
oldMaxLength: 255,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "WebsiteUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(255)",
|
||||
oldMaxLength: 255,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "TikTokUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(255)",
|
||||
oldMaxLength: 255,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "RedditUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(255)",
|
||||
oldMaxLength: 255,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "LinkedInUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(255)",
|
||||
oldMaxLength: 255,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "InstagramUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(255)",
|
||||
oldMaxLength: 255,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FacebookUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(255)",
|
||||
oldMaxLength: 255,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "VideoUrl",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(2000)",
|
||||
oldMaxLength: 2000);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "MainImageUrl",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(2000)",
|
||||
oldMaxLength: 2000);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Image4Url",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(2000)",
|
||||
oldMaxLength: 2000);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Image3Url",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(2000)",
|
||||
oldMaxLength: 2000);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Image2Url",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(2000)",
|
||||
oldMaxLength: 2000);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Image1Url",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(2000)",
|
||||
oldMaxLength: 2000);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ThumbnailUrl",
|
||||
schema: "Content",
|
||||
table: "Contents",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(512)",
|
||||
oldMaxLength: 512,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "HtmlFileUrl",
|
||||
schema: "Content",
|
||||
table: "Contents",
|
||||
type: "character varying(1024)",
|
||||
maxLength: 1024,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(2048)",
|
||||
oldMaxLength: 2048,
|
||||
oldNullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "YoutubeUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(255)",
|
||||
maxLength: 255,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "XUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(255)",
|
||||
maxLength: 255,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "WebsiteUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(255)",
|
||||
maxLength: 255,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "TikTokUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(255)",
|
||||
maxLength: 255,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "RedditUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(255)",
|
||||
maxLength: 255,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "LinkedInUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(255)",
|
||||
maxLength: 255,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "InstagramUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(255)",
|
||||
maxLength: 255,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FacebookUrl",
|
||||
schema: "Content",
|
||||
table: "Socials",
|
||||
type: "character varying(255)",
|
||||
maxLength: 255,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "VideoUrl",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(2000)",
|
||||
maxLength: 2000,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "MainImageUrl",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(2000)",
|
||||
maxLength: 2000,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Image4Url",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(2000)",
|
||||
maxLength: 2000,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Image3Url",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(2000)",
|
||||
maxLength: 2000,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Image2Url",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(2000)",
|
||||
maxLength: 2000,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Image1Url",
|
||||
schema: "Content",
|
||||
table: "PresentationInfos",
|
||||
type: "character varying(2000)",
|
||||
maxLength: 2000,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ThumbnailUrl",
|
||||
schema: "Content",
|
||||
table: "Contents",
|
||||
type: "character varying(512)",
|
||||
maxLength: 512,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "HtmlFileUrl",
|
||||
schema: "Content",
|
||||
table: "Contents",
|
||||
type: "character varying(2048)",
|
||||
maxLength: 2048,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(1024)",
|
||||
oldMaxLength: 1024,
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user