341 lines
11 KiB
C#
341 lines
11 KiB
C#
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<string>(
|
|
name: "StockId",
|
|
table: "Stocks",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "StockExtId",
|
|
table: "Stocks",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Comment",
|
|
table: "Stocks",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "StockName",
|
|
table: "StockGroups",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "StockGroup",
|
|
table: "StockGroups",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Comment",
|
|
table: "PersonStocks",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "NickName",
|
|
table: "Persons",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "LastName",
|
|
table: "Persons",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "FirstName",
|
|
table: "Persons",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Comments",
|
|
table: "Persons",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Born",
|
|
table: "Persons",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "DbName",
|
|
table: "BackupRegings",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "BackupPath",
|
|
table: "BackupRegings",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "BackupDbName",
|
|
table: "BackupRegings",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Street2",
|
|
table: "Addresses",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Street",
|
|
table: "Addresses",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Nation",
|
|
table: "Addresses",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
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<string>(
|
|
name: "StockId",
|
|
table: "Stocks",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "StockExtId",
|
|
table: "Stocks",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Comment",
|
|
table: "Stocks",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "StockName",
|
|
table: "StockGroups",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "GroupName",
|
|
table: "StockGroups",
|
|
type: "TEXT",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Comment",
|
|
table: "PersonStocks",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "NickName",
|
|
table: "Persons",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "LastName",
|
|
table: "Persons",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "FirstName",
|
|
table: "Persons",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Comments",
|
|
table: "Persons",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Born",
|
|
table: "Persons",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "DbName",
|
|
table: "BackupRegings",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "BackupPath",
|
|
table: "BackupRegings",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "BackupDbName",
|
|
table: "BackupRegings",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Street2",
|
|
table: "Addresses",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Street",
|
|
table: "Addresses",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Nation",
|
|
table: "Addresses",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Destination",
|
|
table: "Addresses",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
}
|
|
}
|
|
}
|