using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace Data.Migrations.Postgresql { public partial class UpdateMigrationsForPostgresql : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_EFHitLocationCounts_EFClientStatistics_EFClientStatisticsClientId_EFClientStatisticsServerId", table: "EFHitLocationCounts"); migrationBuilder.RenameIndex( name: "IX_EFHitLocationCounts_EFClientStatisticsClientId_EFClientStatisticsServerId", table: "EFHitLocationCounts", newName: "IX_EFHitLocationCounts_EFClientStatisticsClientId_EFClientStat~"); migrationBuilder.AlterColumn( name: "Z", table: "Vector3", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "Y", table: "Vector3", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "X", table: "Vector3", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "Vector3Id", table: "Vector3", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "TotalPlayTime", table: "EFServerStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "TotalKills", table: "EFServerStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ServerId", table: "EFServerStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Active", table: "EFServerStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "StatisticId", table: "EFServerStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "Port", table: "EFServers", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "IsPasswordProtected", table: "EFServers", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "HostName", table: "EFServers", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "GameName", table: "EFServers", nullable: true, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "EndPoint", table: "EFServers", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Active", table: "EFServers", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ServerId", table: "EFServers", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "When", table: "EFRating", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "ServerId", table: "EFRating", nullable: true, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "RatingHistoryId", table: "EFRating", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Ranking", table: "EFRating", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Performance", table: "EFRating", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "Newest", table: "EFRating", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ActivityAmount", table: "EFRating", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Active", table: "EFRating", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "RatingId", table: "EFRating", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "When", table: "EFPenalties", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Type", table: "EFPenalties", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "PunisherId", table: "EFPenalties", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Offense", table: "EFPenalties", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "OffenderId", table: "EFPenalties", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "LinkId", table: "EFPenalties", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "IsEvadedOffense", table: "EFPenalties", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Expires", table: "EFPenalties", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "AutomatedOffense", table: "EFPenalties", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Active", table: "EFPenalties", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "PenaltyId", table: "EFPenalties", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "Value", table: "EFMeta", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Updated", table: "EFMeta", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Key", table: "EFMeta", maxLength: 32, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 32); migrationBuilder.AlterColumn( name: "Extra", table: "EFMeta", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Created", table: "EFMeta", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "ClientId", table: "EFMeta", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Active", table: "EFMeta", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "MetaId", table: "EFMeta", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "MaxAngleDistance", table: "EFHitLocationCounts", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "Location", table: "EFHitLocationCounts", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "HitOffsetAverage", table: "EFHitLocationCounts", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "HitCount", table: "EFHitLocationCounts", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "EFClientStatisticsServerId", table: "EFHitLocationCounts", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "EFClientStatisticsClientId", table: "EFHitLocationCounts", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Active", table: "EFHitLocationCounts", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "HitLocationCountId", table: "EFHitLocationCounts", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "VisionAverage", table: "EFClientStatistics", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "TimePlayed", table: "EFClientStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "SnapHitCount", table: "EFClientStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Skill", table: "EFClientStatistics", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "SPM", table: "EFClientStatistics", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "RollingWeightedKDR", table: "EFClientStatistics", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "MaxStrain", table: "EFClientStatistics", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "Kills", table: "EFClientStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "EloRating", table: "EFClientStatistics", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "Deaths", table: "EFClientStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "AverageSnapValue", table: "EFClientStatistics", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "AverageRecoilOffset", table: "EFClientStatistics", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "Active", table: "EFClientStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ServerId", table: "EFClientStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ClientId", table: "EFClientStatistics", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "TotalConnectionTime", table: "EFClients", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "PasswordSalt", table: "EFClients", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Password", table: "EFClients", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "NetworkId", table: "EFClients", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Masked", table: "EFClients", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Level", table: "EFClients", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "LastConnection", table: "EFClients", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "FirstConnection", table: "EFClients", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "CurrentAliasId", table: "EFClients", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Connections", table: "EFClients", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "AliasLinkId", table: "EFClients", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Active", table: "EFClients", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ClientId", table: "EFClients", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "ClientId", table: "EFClientRatingHistory", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Active", table: "EFClientRatingHistory", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "RatingHistoryId", table: "EFClientRatingHistory", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "TimeSent", table: "EFClientMessages", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "ServerId", table: "EFClientMessages", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.Sql("ALTER TABLE \"EFClientMessages\" ALTER COLUMN \"SentIngame\" DROP DEFAULT;" + "ALTER TABLE \"EFClientMessages\" ALTER \"SentIngame\" TYPE bool USING CASE WHEN \"SentIngame\"=0 THEN FALSE ELSE TRUE END;" + "ALTER TABLE \"EFClientMessages\" ALTER COLUMN \"SentIngame\" SET DEFAULT TRUE;"); migrationBuilder.AlterColumn( name: "Message", table: "EFClientMessages", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "ClientId", table: "EFClientMessages", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Active", table: "EFClientMessages", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "MessageId", table: "EFClientMessages", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "When", table: "EFClientKills", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Weapon", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "VisibilityPercentage", table: "EFClientKills", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "ViewAnglesVector3Id", table: "EFClientKills", nullable: true, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "VictimId", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ServerId", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Map", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "KillOriginVector3Id", table: "EFClientKills", nullable: true, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "IsKill", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "HitLoc", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Fraction", table: "EFClientKills", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "DeathType", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "DeathOriginVector3Id", table: "EFClientKills", nullable: true, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "Damage", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "AttackerId", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Active", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "KillId", table: "EFClientKills", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "TypeOfChange", table: "EFChangeHistory", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "TimeChanged", table: "EFChangeHistory", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "TargetEntityId", table: "EFChangeHistory", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "PreviousValue", table: "EFChangeHistory", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "OriginEntityId", table: "EFChangeHistory", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ImpersonationEntityId", table: "EFChangeHistory", nullable: true, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "CurrentValue", table: "EFChangeHistory", nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Comment", table: "EFChangeHistory", maxLength: 128, nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 128, oldNullable: true); migrationBuilder.AlterColumn( name: "Active", table: "EFChangeHistory", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ChangeHistoryId", table: "EFChangeHistory", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "Active", table: "EFAliasLinks", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "AliasLinkId", table: "EFAliasLinks", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "SearchableName", table: "EFAlias", maxLength: 24, nullable: true, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 24, oldNullable: true); migrationBuilder.AlterColumn( name: "Name", table: "EFAlias", maxLength: 24, nullable: false, oldClrType: typeof(string), oldType: "TEXT", oldMaxLength: 24); migrationBuilder.AlterColumn( name: "LinkId", table: "EFAlias", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "IPAddress", table: "EFAlias", nullable: true, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "DateAdded", table: "EFAlias", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Active", table: "EFAlias", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "AliasId", table: "EFAlias", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "Vector3Id", table: "EFACSnapshotVector3", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "SnapshotId", table: "EFACSnapshotVector3", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.Sql("ALTER TABLE \"EFACSnapshotVector3\" ALTER COLUMN \"Active\" DROP DEFAULT;" + "ALTER TABLE \"EFACSnapshotVector3\" ALTER \"Active\" TYPE bool USING CASE WHEN \"Active\"=0 THEN FALSE ELSE TRUE END;" + "ALTER TABLE \"EFACSnapshotVector3\" ALTER COLUMN \"Active\" SET DEFAULT TRUE;"); migrationBuilder.AlterColumn( name: "ACSnapshotVector3Id", table: "EFACSnapshotVector3", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "When", table: "EFACSnapshot", nullable: false, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "WeaponId", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "TimeSinceLastEvent", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "StrainAngleBetween", table: "EFACSnapshot", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "SessionSnapHits", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "SessionScore", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "SessionSPM", table: "EFACSnapshot", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "SessionAverageSnapValue", table: "EFACSnapshot", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "SessionAngleOffset", table: "EFACSnapshot", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "RecoilOffset", table: "EFACSnapshot", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "LastStrainAngleId", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Kills", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Hits", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "HitType", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "HitOriginId", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "HitLocation", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "HitDestinationId", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "EloRating", table: "EFACSnapshot", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "Distance", table: "EFACSnapshot", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "Deaths", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "CurrentViewAngleId", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "CurrentStrain", table: "EFACSnapshot", nullable: false, oldClrType: typeof(float), oldType: "REAL"); migrationBuilder.AlterColumn( name: "CurrentSessionLength", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "ClientId", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "Active", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "SnapshotId", table: "EFACSnapshot", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AddForeignKey( name: "FK_EFHitLocationCounts_EFClientStatistics_EFClientStatisticsCl~", table: "EFHitLocationCounts", columns: new[] { "EFClientStatisticsClientId", "EFClientStatisticsServerId" }, principalTable: "EFClientStatistics", principalColumns: new[] { "ClientId", "ServerId" }, onDelete: ReferentialAction.Cascade); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_EFHitLocationCounts_EFClientStatistics_EFClientStatisticsCl~", table: "EFHitLocationCounts"); migrationBuilder.RenameIndex( name: "IX_EFHitLocationCounts_EFClientStatisticsClientId_EFClientStat~", table: "EFHitLocationCounts", newName: "IX_EFHitLocationCounts_EFClientStatisticsClientId_EFClientStatisticsServerId"); migrationBuilder.AlterColumn( name: "Z", table: "Vector3", type: "REAL", nullable: false, oldClrType: typeof(float)); migrationBuilder.AlterColumn( name: "Y", table: "Vector3", type: "REAL", nullable: false, oldClrType: typeof(float)); migrationBuilder.AlterColumn( name: "X", table: "Vector3", type: "REAL", nullable: false, oldClrType: typeof(float)); migrationBuilder.AlterColumn( name: "Vector3Id", table: "Vector3", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "TotalPlayTime", table: "EFServerStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(long)); migrationBuilder.AlterColumn( name: "TotalKills", table: "EFServerStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(long)); migrationBuilder.AlterColumn( name: "ServerId", table: "EFServerStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(long)); migrationBuilder.AlterColumn( name: "Active", table: "EFServerStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "StatisticId", table: "EFServerStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "Port", table: "EFServers", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "IsPasswordProtected", table: "EFServers", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "HostName", table: "EFServers", type: "TEXT", nullable: true, oldClrType: typeof(string), oldNullable: true); migrationBuilder.AlterColumn( name: "GameName", table: "EFServers", type: "INTEGER", nullable: true, oldClrType: typeof(int), oldNullable: true); migrationBuilder.AlterColumn( name: "EndPoint", table: "EFServers", type: "TEXT", nullable: true, oldClrType: typeof(string), oldNullable: true); migrationBuilder.AlterColumn( name: "Active", table: "EFServers", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "ServerId", table: "EFServers", type: "INTEGER", nullable: false, oldClrType: typeof(long)); migrationBuilder.AlterColumn( name: "When", table: "EFRating", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "ServerId", table: "EFRating", type: "INTEGER", nullable: true, oldClrType: typeof(long), oldNullable: true); migrationBuilder.AlterColumn( name: "RatingHistoryId", table: "EFRating", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Ranking", table: "EFRating", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Performance", table: "EFRating", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "Newest", table: "EFRating", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "ActivityAmount", table: "EFRating", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Active", table: "EFRating", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "RatingId", table: "EFRating", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "When", table: "EFPenalties", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "Type", table: "EFPenalties", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "PunisherId", table: "EFPenalties", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Offense", table: "EFPenalties", type: "TEXT", nullable: false, oldClrType: typeof(string)); migrationBuilder.AlterColumn( name: "OffenderId", table: "EFPenalties", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "LinkId", table: "EFPenalties", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "IsEvadedOffense", table: "EFPenalties", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "Expires", table: "EFPenalties", type: "TEXT", nullable: true, oldClrType: typeof(DateTime), oldNullable: true); migrationBuilder.AlterColumn( name: "AutomatedOffense", table: "EFPenalties", type: "TEXT", nullable: true, oldClrType: typeof(string), oldNullable: true); migrationBuilder.AlterColumn( name: "Active", table: "EFPenalties", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "PenaltyId", table: "EFPenalties", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "Value", table: "EFMeta", type: "TEXT", nullable: false, oldClrType: typeof(string)); migrationBuilder.AlterColumn( name: "Updated", table: "EFMeta", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "Key", table: "EFMeta", type: "TEXT", maxLength: 32, nullable: false, oldClrType: typeof(string), oldMaxLength: 32); migrationBuilder.AlterColumn( name: "Extra", table: "EFMeta", type: "TEXT", nullable: true, oldClrType: typeof(string), oldNullable: true); migrationBuilder.AlterColumn( name: "Created", table: "EFMeta", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "ClientId", table: "EFMeta", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Active", table: "EFMeta", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "MetaId", table: "EFMeta", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "MaxAngleDistance", table: "EFHitLocationCounts", type: "REAL", nullable: false, oldClrType: typeof(float)); migrationBuilder.AlterColumn( name: "Location", table: "EFHitLocationCounts", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "HitOffsetAverage", table: "EFHitLocationCounts", type: "REAL", nullable: false, oldClrType: typeof(float)); migrationBuilder.AlterColumn( name: "HitCount", table: "EFHitLocationCounts", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "EFClientStatisticsServerId", table: "EFHitLocationCounts", type: "INTEGER", nullable: false, oldClrType: typeof(long)); migrationBuilder.AlterColumn( name: "EFClientStatisticsClientId", table: "EFHitLocationCounts", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Active", table: "EFHitLocationCounts", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "HitLocationCountId", table: "EFHitLocationCounts", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "VisionAverage", table: "EFClientStatistics", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "TimePlayed", table: "EFClientStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "SnapHitCount", table: "EFClientStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Skill", table: "EFClientStatistics", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "SPM", table: "EFClientStatistics", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "RollingWeightedKDR", table: "EFClientStatistics", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "MaxStrain", table: "EFClientStatistics", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "Kills", table: "EFClientStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "EloRating", table: "EFClientStatistics", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "Deaths", table: "EFClientStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "AverageSnapValue", table: "EFClientStatistics", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "AverageRecoilOffset", table: "EFClientStatistics", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "Active", table: "EFClientStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "ServerId", table: "EFClientStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(long)); migrationBuilder.AlterColumn( name: "ClientId", table: "EFClientStatistics", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "TotalConnectionTime", table: "EFClients", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "PasswordSalt", table: "EFClients", type: "TEXT", nullable: true, oldClrType: typeof(string), oldNullable: true); migrationBuilder.AlterColumn( name: "Password", table: "EFClients", type: "TEXT", nullable: true, oldClrType: typeof(string), oldNullable: true); migrationBuilder.AlterColumn( name: "NetworkId", table: "EFClients", type: "INTEGER", nullable: false, oldClrType: typeof(long)); migrationBuilder.AlterColumn( name: "Masked", table: "EFClients", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "Level", table: "EFClients", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "LastConnection", table: "EFClients", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "FirstConnection", table: "EFClients", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "CurrentAliasId", table: "EFClients", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Connections", table: "EFClients", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "AliasLinkId", table: "EFClients", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Active", table: "EFClients", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "ClientId", table: "EFClients", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "ClientId", table: "EFClientRatingHistory", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Active", table: "EFClientRatingHistory", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "RatingHistoryId", table: "EFClientRatingHistory", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "TimeSent", table: "EFClientMessages", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "ServerId", table: "EFClientMessages", type: "INTEGER", nullable: false, oldClrType: typeof(long)); migrationBuilder.AlterColumn( name: "SentIngame", table: "EFClientMessages", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "Message", table: "EFClientMessages", type: "TEXT", nullable: true, oldClrType: typeof(string), oldNullable: true); migrationBuilder.AlterColumn( name: "ClientId", table: "EFClientMessages", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Active", table: "EFClientMessages", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "MessageId", table: "EFClientMessages", type: "INTEGER", nullable: false, oldClrType: typeof(long)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "When", table: "EFClientKills", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "Weapon", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "VisibilityPercentage", table: "EFClientKills", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "ViewAnglesVector3Id", table: "EFClientKills", type: "INTEGER", nullable: true, oldClrType: typeof(int), oldNullable: true); migrationBuilder.AlterColumn( name: "VictimId", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "ServerId", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(long)); migrationBuilder.AlterColumn( name: "Map", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "KillOriginVector3Id", table: "EFClientKills", type: "INTEGER", nullable: true, oldClrType: typeof(int), oldNullable: true); migrationBuilder.AlterColumn( name: "IsKill", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "HitLoc", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Fraction", table: "EFClientKills", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "DeathType", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "DeathOriginVector3Id", table: "EFClientKills", type: "INTEGER", nullable: true, oldClrType: typeof(int), oldNullable: true); migrationBuilder.AlterColumn( name: "Damage", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "AttackerId", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Active", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "KillId", table: "EFClientKills", type: "INTEGER", nullable: false, oldClrType: typeof(long)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "TypeOfChange", table: "EFChangeHistory", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "TimeChanged", table: "EFChangeHistory", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "TargetEntityId", table: "EFChangeHistory", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "PreviousValue", table: "EFChangeHistory", type: "TEXT", nullable: true, oldClrType: typeof(string), oldNullable: true); migrationBuilder.AlterColumn( name: "OriginEntityId", table: "EFChangeHistory", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "ImpersonationEntityId", table: "EFChangeHistory", type: "INTEGER", nullable: true, oldClrType: typeof(int), oldNullable: true); migrationBuilder.AlterColumn( name: "CurrentValue", table: "EFChangeHistory", type: "TEXT", nullable: true, oldClrType: typeof(string), oldNullable: true); migrationBuilder.AlterColumn( name: "Comment", table: "EFChangeHistory", type: "TEXT", maxLength: 128, nullable: true, oldClrType: typeof(string), oldMaxLength: 128, oldNullable: true); migrationBuilder.AlterColumn( name: "Active", table: "EFChangeHistory", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "ChangeHistoryId", table: "EFChangeHistory", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "Active", table: "EFAliasLinks", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "AliasLinkId", table: "EFAliasLinks", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "SearchableName", table: "EFAlias", type: "TEXT", maxLength: 24, nullable: true, oldClrType: typeof(string), oldMaxLength: 24, oldNullable: true); migrationBuilder.AlterColumn( name: "Name", table: "EFAlias", type: "TEXT", maxLength: 24, nullable: false, oldClrType: typeof(string), oldMaxLength: 24); migrationBuilder.AlterColumn( name: "LinkId", table: "EFAlias", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "IPAddress", table: "EFAlias", type: "INTEGER", nullable: true, oldClrType: typeof(int), oldNullable: true); migrationBuilder.AlterColumn( name: "DateAdded", table: "EFAlias", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "Active", table: "EFAlias", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "AliasId", table: "EFAlias", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "Vector3Id", table: "EFACSnapshotVector3", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "SnapshotId", table: "EFACSnapshotVector3", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Active", table: "EFACSnapshotVector3", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "ACSnapshotVector3Id", table: "EFACSnapshotVector3", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AlterColumn( name: "When", table: "EFACSnapshot", type: "TEXT", nullable: false, oldClrType: typeof(DateTime)); migrationBuilder.AlterColumn( name: "WeaponId", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "TimeSinceLastEvent", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "StrainAngleBetween", table: "EFACSnapshot", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "SessionSnapHits", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "SessionScore", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "SessionSPM", table: "EFACSnapshot", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "SessionAverageSnapValue", table: "EFACSnapshot", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "SessionAngleOffset", table: "EFACSnapshot", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "RecoilOffset", table: "EFACSnapshot", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "LastStrainAngleId", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Kills", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Hits", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "HitType", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "HitOriginId", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "HitLocation", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "HitDestinationId", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "EloRating", table: "EFACSnapshot", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "Distance", table: "EFACSnapshot", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "Deaths", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "CurrentViewAngleId", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "CurrentStrain", table: "EFACSnapshot", type: "REAL", nullable: false, oldClrType: typeof(double)); migrationBuilder.AlterColumn( name: "CurrentSessionLength", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "ClientId", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)); migrationBuilder.AlterColumn( name: "Active", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(bool)); migrationBuilder.AlterColumn( name: "SnapshotId", table: "EFACSnapshot", type: "INTEGER", nullable: false, oldClrType: typeof(int)) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn); migrationBuilder.AddForeignKey( name: "FK_EFHitLocationCounts_EFClientStatistics_EFClientStatisticsClientId_EFClientStatisticsServerId", table: "EFHitLocationCounts", columns: new[] { "EFClientStatisticsClientId", "EFClientStatisticsServerId" }, principalTable: "EFClientStatistics", principalColumns: new[] { "ClientId", "ServerId" }, onDelete: ReferentialAction.Cascade); } } }