Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8076443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:15:44+00:00 2026-06-05T15:15:44+00:00

I have an issue which I could not find answer for across the web.

  • 0

I have an issue which I could not find answer for across the web.

I am using CodeFirst EF 4.3.1 Migrations with MySQL.

My MySQL provider is Devart.

After running Add-Migration against an existing database, I got the following code:

public partial class ChangeSet_1231 : DbMigration
{
    public override void Up()
    {
        RenameColumn(table: "RW_TTaskInstanceProperties", name: "TaskInstance_TaskInstanceId", newName: "TaskInstanceId");
    }

    public override void Down()
    {
        RenameColumn(table: "RW_TTaskInstanceProperties", name: "TaskInstanceId", newName: "TaskInstance_TaskInstanceId");
    }
}

Running Update-Database results in the following error:

PM> Update-Database -verbose –startupprojectname "RTDataAccess"
Using NuGet project 'RTDataAccess'.
Target database is: 'rsruntime' (DataSource: localhost, Provider: Devart.Data.MySql, Origin: Explicit).
Applying explicit migrations: [201205311312361_ChangeSet_1231].
Applying explicit migration: 201205311312361_ChangeSet_1231.
ALTER TABLE RW_TTaskInstanceProperties RENAME COLUMN TaskInstance_TaskInstanceId TO TaskInstanceId

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLUMN TaskInstance_TaskInstanceId TO TaskInstanceId' at line 2

From looking at the error details I see that the RenameColumn is translated to a MsSql command, rather than MySql command, so no wonder it reports about a syntax error.

Any ideas how to solve it?

I know I can use Update-Database -script, then edit the script to fit MySql and run it, but I prefer to make the Update-Database command work…

Thanks.

In response to Ladislav’s question:

Yes, I registered the Devart’s SQL generator for MySQL Migrations.
My Configuration class looks like that:

using Devart.Data.MySql.Entity.Configuration;
using Devart.Data.MySql.Entity.Migrations;

internal sealed class Configuration : DbMigrationsConfiguration<RTDataAccess.RTContext>
{
    public Configuration()
    {
        AutomaticMigrationsEnabled = false;

        MySqlEntityProviderConfig.Instance.Workarounds.IgnoreSchemaName = true;
        var connectionInfo = MySqlConnectionInfo.CreateConnection("Server=xxxx;Port=yyyy;Database=rsruntime;Uid=zzzz;Pwd=wwww;charset=utf8;");
        this.TargetDatabase = connectionInfo;
        this.SetSqlGenerator(connectionInfo.GetInvariantName(), new MySqlEntityMigrationSqlGenerator());
    }

    protected override void Seed(RTDataAccess.RTContext context)
    {
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:15:45+00:00Added an answer on June 5, 2026 at 3:15 pm

    The issue was fixed by Devart.

    Details at the following links:

    http://forums.devart.com/viewtopic.php?f=2&t=24250

    http://www.devart.com/dotconnect/mysql/download.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue which I could not find answer for across the web.
I have some urgent issue which I could not find answer for across the
I have yet another issue which the answer is eluding me. I wish to
This seems like a fairly simple issue, however I could not find any straight
This may have been answered elsewhere but I could not find a suitable response.
I have not been able to find an answer for this on Google. I
i have a small issue which my text field insist to inhert the CSS
I have an issue with log4net which has been bugging me for a while
I have been working on a json decode issue (which I have already had
I'm pretty new in iphone programming and have stumbled upon this issue which I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.