From d29fb89a79f10fd3c828cd87f63702d41a10fcf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Mon, 30 May 2022 15:13:35 +0200 Subject: [PATCH] #397 - More fixes to the migration. --- .../20210706080438_ExpenseTemplates.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Money.Models.EntityFrameworkCore/Migrations/20210706080438_ExpenseTemplates.cs b/src/Money.Models.EntityFrameworkCore/Migrations/20210706080438_ExpenseTemplates.cs index f4e951c9..ab564ad0 100644 --- a/src/Money.Models.EntityFrameworkCore/Migrations/20210706080438_ExpenseTemplates.cs +++ b/src/Money.Models.EntityFrameworkCore/Migrations/20210706080438_ExpenseTemplates.cs @@ -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 { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ExpenseTemplates", + schema: Schema.Name, columns: table => new { Id = table.Column(nullable: false), - UserId = table.Column(type: "TEXT", nullable: true), - Description = table.Column(type: "TEXT", nullable: true), - Amount = table.Column(type: "TEXT", nullable: true), - Currency = table.Column(type: "TEXT", nullable: true), - CategoryId = table.Column(type: "TEXT", nullable: true) + UserId = table.Column(maxLength: 36, nullable: false), + Description = table.Column(nullable: true), + Amount = table.Column(nullable: true), + Currency = table.Column(nullable: true), + CategoryId = table.Column(nullable: true) }, constraints: table => { @@ -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); } } }