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

Migrations :: ForSqlServer() configuration doesn't work with migrations #1975

Closed
maumar opened this issue Apr 1, 2015 · 4 comments
Closed
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@maumar
Copy link
Contributor

maumar commented Apr 1, 2015

E.g. trying to change Index name by:

modelBuilder.Entity<City>().Index("Shadow", "Name").ForSqlServer().Name("My index");

This gets ignored and produces index with default name - "IX_City_Shadow_Name"

@maumar maumar changed the title Migrations :: AsSqlServer() commands don't work with migrations Migrations :: ForSqlServer() commands don't work with migrations Apr 1, 2015
@bricelam
Copy link
Contributor

bricelam commented Apr 2, 2015

This work is part of #1904

@divega divega added the pri0 label Apr 13, 2015
@divega divega added this to the 7.0.0 milestone Apr 13, 2015
@bricelam bricelam changed the title Migrations :: ForSqlServer() commands don't work with migrations Migrations :: ForSqlServer() configuration doesn't work with migrations May 4, 2015
@npnelson
Copy link

npnelson commented May 4, 2015

Is there any kind of workaround for this right now? I am trying to pluralize my table names using builder.Entity<TestModel>().ForSqlServer().Table("TestModels"); This worked fine in beta3 but fails in beta4.

Specifically, I like to use LocalDb for some of my tests and it creates the table using the entity name instead of my pluralized name.

If I'm not making any sense, check this repo out for a console based demo using CoreCLR beta4:

https://github.com/npnelson/TestEF7TableNameDemo

@bricelam
Copy link
Contributor

bricelam commented May 4, 2015

To work around, use .ForRelational() instead.

@npnelson
Copy link

npnelson commented May 5, 2015

Thanks, that worked - I should have thought of that

@bricelam bricelam modified the milestones: 7.0.0-beta5, 7.0.0 May 26, 2015
@bricelam bricelam modified the milestones: 7.0.0-beta6, 7.0.0-beta5 May 28, 2015
@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-beta6, 1.0.0 Oct 15, 2022
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-bug
Projects
None yet
Development

No branches or pull requests

5 participants