Pomelo.EntityFrameworkCore.MySql: Scaffolding not working

I run this command with and get no result

See console output image

Further technical details

MySQL version: 5.7.15 Operating system: Windows 10 x64 Pomelo.EntityFrameworkCore.MySql version: “1.1.0”

Other details about my project setup:

{
  "version": "1.0.0-*",
  "buildOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.1.0"
    },
    "Pomelo.EntityFrameworkCore.MySql": "1.1.0",
    "Pomelo.EntityFrameworkCore.MySql.Design": "1.1.0",
    "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final"
  },
  "tools": {
    "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
    "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports": "dnxcore50"
    }
  }
}

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (2 by maintainers)

Most upvoted comments

@JanBN - The changes are incredibly simple to make. I pulled in the repository source code and added three lines.

Inside Microsoft.EntityFrameworkCore.Storage.Internal.MySqlTypeMapper (Pomelo.EntityFrameworkCore.MySql\Storage\Internal\MySqlTypeMapper)

Added line 51:

private readonly RelationalTypeMapping _date6 = new RelationalTypeMapping("datetime(6)", typeof(DateTime), DbType.Date);

Added lines 110 & 111:

{ "timestamp", _dateTime6 },
{ "date", _date6 },

This added the mapping for timestamp and date types. I haven’t submitted a pull request yet because I wasn’t 100% sure if there was something else that also needed to be modified along with this. My testing was very limited but in my scenario it worked perfectly and resolve 98% of my issues. The rest of the issues were related to tables with no Primary Key. As it turned out, they were all temp and indexing tables that I didn’t need anyway.

I was running on a MySql DB with only a single database. That one database has 460 tables.