Bug #70176 Code Based Migrations (EF5) bug : "Parameter '@columnType' must be defined."
Submitted: 28 Aug 2013 16:45 Modified: 17 Oct 2013 12:34
Reporter: Developpeurs CPAM Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.7.4 OS:Microsoft Windows
Assigned to: MySQL Verification Team CPU Architecture:Any

[28 Aug 2013 16:45] Developpeurs CPAM
Description:
Hi !

I've a problem with Code Based Migrations (EF5). 

I want to rename a property on an existing entity (let's say 'myclass'), and then add a new property with the old name of the previous property.

I added a DbMigration :

Partial Public Class MigrationOne
	Inherits DbMigration

	Public Overrides Sub Up()
		RenameColumn("myclass", "columnone", "columntwo")
		AlterColumn("myclass", "columntwo", Function(c) c.String(True, , , , , "", "", "columntwo", "LONGTEXT"))
		AddColumn("myclass", "columnone", Function(c) c.String(True, , , , , "", "", "columnone", "LONGTEXT"))
	End Sub

	Public Overrides Sub Down()
		DropColumn("myclass", "columnone")
		RenameColumn("myclass", "columntwo", "columnone")
		AlterColumn("myclass", "columnone", Function(c) c.String(False, , , , , "", "", "columnone", "LONGTEXT"))
	End Sub

End Class

And i get an exception : "Parameter '@columnType' must be defined.".

Thx for help.

How to repeat:
Create an entity with a string property named 'columnone'.

Then try to use Code Based Migrations to rename the first property ('columntwo'), and to add a second string property named 'columnone'.
[17 Sep 2013 12:33] MySQL Verification Team
Thank you for the report. 

Have you tried "Allow User Variables" option? 

Starting from Connector/Net version 5.2.2, you should add the Allow User Variables=True Connection String Setting in order to use User Defined Variables"

Please see http://dev.mysql.com/doc/refman/5.1/en/connector-net-connection-options.html
[18 Oct 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".