using Microsoft.EntityFrameworkCore.Migrations; namespace DatamodelLibrary.Migrations { public partial class StockGroupTable : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "GroupName", table: "StockGroups"); migrationBuilder.AlterColumn( name: "StockId", table: "Stocks", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "StockExtId", table: "Stocks", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Comment", table: "Stocks", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "StockName", table: "StockGroups", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AddColumn( name: "StockGroup", table: "StockGroups", type: "TEXT", nullable: false, defaultValue: ""); migrationBuilder.AlterColumn( name: "Comment", table: "PersonStocks", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "NickName", table: "Persons", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "LastName", table: "Persons", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "FirstName", table: "Persons", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Comments", table: "Persons", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Born", table: "Persons", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "DbName", table: "BackupRegings", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "BackupPath", table: "BackupRegings", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "BackupDbName", table: "BackupRegings", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Street2", table: "Addresses", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Street", table: "Addresses", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Nation", table: "Addresses", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Destination", table: "Addresses", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "StockGroup", table: "StockGroups"); migrationBuilder.AlterColumn( name: "StockId", table: "Stocks", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "StockExtId", table: "Stocks", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Comment", table: "Stocks", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "StockName", table: "StockGroups", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AddColumn( name: "GroupName", table: "StockGroups", type: "TEXT", nullable: true); migrationBuilder.AlterColumn( name: "Comment", table: "PersonStocks", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "NickName", table: "Persons", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "LastName", table: "Persons", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "FirstName", table: "Persons", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Comments", table: "Persons", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Born", table: "Persons", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "DbName", table: "BackupRegings", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "BackupPath", table: "BackupRegings", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "BackupDbName", table: "BackupRegings", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Street2", table: "Addresses", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Street", table: "Addresses", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Nation", table: "Addresses", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Destination", table: "Addresses", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); } } }