Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SqlServer] when generating table, we should generate PKs first and FKs last (just like in EF6) - at the moment it is all in alphabetical order #412

Closed
maumar opened this issue Jul 10, 2014 · 3 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-unknown
Milestone

Comments

@maumar
Copy link
Contributor

maumar commented Jul 10, 2014

I noticed that for models generated with EF7 the table view in SSMS is slightly different than it was in EF6. We used to create something like this:

Id (PK, int, not null)
Color (int, not null)
isLinked (bit, not null)
Item_Id (FK, int, not null)

with EF7 we generate:
Color (int, not null)
Id (PK, int, not null)
Item_Id (FK, int, not null)
isLinked (bit, not null)

We should consider following the old behaviour.

@maumar maumar assigned ghost Jul 14, 2014
@rowanmiller
Copy link
Contributor

We should do the ordering coming out of the model differ, that way users can change the generated code.

@ghost
Copy link

ghost commented Aug 29, 2014

Done.

@ghost ghost added the 3 - Done label Sep 3, 2014
@ghost ghost assigned maumar and unassigned ghost Sep 3, 2014
@jmalatia
Copy link

jmalatia commented Sep 7, 2015

The rest of the columns should be created in the same order as written in the model... not alphabetical.... Just created a db with 7.0.0-beta7-15540 and it created the table columns in alphabetical order! I would expect it to create the table in the same order as the model is written as in EF6.

@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 15, 2022
@ajcvickers ajcvickers modified the milestones: 1.0.0-beta1, 1.0.0 Oct 15, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-unknown
Projects
None yet
Development

No branches or pull requests

4 participants