using System; using Microsoft.EntityFrameworkCore.Migrations; namespace DatamodelLibrary.Migrations { public partial class initial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Persons", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), FirstName = table.Column(type: "TEXT", nullable: true), LastName = table.Column(type: "TEXT", nullable: true), NickName = table.Column(type: "TEXT", nullable: true), Born = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_Persons", x => x.Id); }); migrationBuilder.CreateTable( name: "Stocks", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), StockId = table.Column(type: "TEXT", nullable: true), StockExtId = table.Column(type: "TEXT", nullable: true), BuyValue = table.Column(type: "TEXT", nullable: false), BuyDate = table.Column(type: "TEXT", nullable: false), ActValue = table.Column(type: "TEXT", nullable: false), ActDate = table.Column(type: "TEXT", nullable: true), ActAmount = table.Column(type: "INTEGER", nullable: false), SoldValue = table.Column(type: "TEXT", nullable: true), SoldDate = table.Column(type: "TEXT", nullable: true), Comment = table.Column(type: "TEXT", nullable: true), PostAmount = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Stocks", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Persons"); migrationBuilder.DropTable( name: "Stocks"); } } }