Add project files.
This commit is contained in:
@ -0,0 +1,65 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace DatamodelLibrary.Migrations
|
||||
{
|
||||
public partial class completion_person_address : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Comments",
|
||||
table: "Persons",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "HomeAddress",
|
||||
table: "Persons",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "InvoiceAddress",
|
||||
table: "Persons",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Addresses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Gata = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Gata2 = table.Column<string>(type: "TEXT", nullable: true),
|
||||
PostNr = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
PostOrt = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Nation = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Addresses", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Addresses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Comments",
|
||||
table: "Persons");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HomeAddress",
|
||||
table: "Persons");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InvoiceAddress",
|
||||
table: "Persons");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user