Skip to content

Commit

Permalink
#397 - More fixes to the migration.
Browse files Browse the repository at this point in the history
  • Loading branch information
maraf committed May 30, 2022
1 parent 96d15f1 commit d29fb89
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Money.EntityFrameworkCore.Migrations;

namespace Money.Models.Migrations
{
public partial class ExpenseTemplates : Migration
public partial class ExpenseTemplates : MigrationWithSchema<ReadModelContext>
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ExpenseTemplates",
schema: Schema.Name,
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
UserId = table.Column<string>(type: "TEXT", nullable: true),
Description = table.Column<string>(type: "TEXT", nullable: true),
Amount = table.Column<decimal>(type: "TEXT", nullable: true),
Currency = table.Column<string>(type: "TEXT", nullable: true),
CategoryId = table.Column<Guid>(type: "TEXT", nullable: true)
UserId = table.Column<string>(maxLength: 36, nullable: false),
Description = table.Column<string>(nullable: true),
Amount = table.Column<decimal>(nullable: true),
Currency = table.Column<string>(nullable: true),
CategoryId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
Expand All @@ -27,7 +29,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ExpenseTemplates");
name: "ExpenseTemplates",
schema: Schema.Name);
}
}
}

0 comments on commit d29fb89

Please sign in to comment.