Bug #78257 EntityFramework migrations sql reneration bug (alter table)
| Submitted: | 28 Aug 2015 9:16 | Modified: | 31 Aug 2015 6:09 |
|---|---|---|---|
| Reporter: | Stef Rave | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | Connector / NET | Severity: | S2 (Serious) |
| Version: | 6.9.7 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[31 Aug 2015 6:09]
Chiranjeevi Battula
Hello Stef Rave, Thank you for the bug report. This is most likely duplicate of Bug #76292, please see Bug #76292 Thanks, Chiranjeevi.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: When creating a table with private key when doing automatic migrations from code. The following statement was generated: ALTER TABLE `Groups` ADD PRIMARY KEY (Key) This failes because "Key" is a reserved word The generated statement should have been: ALTER TABLE `Groups` ADD PRIMARY KEY (`Key`) When generating a script from the Visual Studio "Package Manager Console" using Update-Database with the "-Script" parameter, a correct statement is created. How to repeat: Do code first migration from: [Table("Hello")] public class Merchant { [Key] public int Key { get; set; } }