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'.
BUG: Column type does not update
Re: BUG: Column type does not update
With Entity Developer and dotConnect for PostgreSQL, the output is:
Please send us a small test project so that we can reproduce the issue.
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");
}
}