Page 1 of 1

BUG: Column type does not update

Posted: Thu 29 Nov 2018 11:47
by RobertK
1. Create a entity table, add a column with type GUID and save it! Close Entity Developer and reopen Entity Developer again.
2. Create another entity table, copy and paste the GUID column in step 1
3. Change the column type to "String"
4. add migration via command >> Add-Migration v1 -context "ApplicationDbContext" -OutputDir "Data"


Error: he property 'Example.Column1' is of type 'string' which is not supported by current database provider. Either change the property CLR type or ignore the property using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.

Re: BUG: Column type does not update

Posted: Wed 05 Dec 2018 18:11
by Shalex
With Entity Developer and dotConnect for PostgreSQL, the output is:

Code: Select all

PM> Add-Migration v1 -context "ApplicationDbContext" -OutputDir "Data"
To undo this action, use Remove-Migration.
PM>

...

   public partial class v1 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Class1s",
                columns: table => new
                {
                    Id = table.Column<Guid>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Class1s", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Class2s",
                columns: table => new
                {
                    Id = table.Column<string>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Class2s", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Class1s");

            migrationBuilder.DropTable(
                name: "Class2s");
        }
    }
Please send us a small test project so that we can reproduce the issue.