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: verbose logging to include actual sql #4401

Closed
esargent opened this issue Jan 26, 2016 · 0 comments
Closed

Migrations: verbose logging to include actual sql #4401

esargent opened this issue Jan 26, 2016 · 0 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@esargent
Copy link

When running an update with --verbose I got his message:

C:\code\RevelarPortalSolution\src\RevelarMVC>dnx ef database update --verbose
Finding DbContext classes...
Using context 'ApplicationDbContext'.
Using database 'NewRevelarPortal' on server '(local)'.
Applying migration '20160126184050_practitionerupdates'.
System.Data.SqlClient.SqlException (0x80131904): The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Distributor_Countries_CountryId". The conflict occurred in database "NewRevelarPortal", table "dbo.Countries", column 'Id'.

Although it isn't much of a leap to figure out in this relatively small migration, it would be even nicer to see the SQL that caused the error, as well as the SQL that occurred before it - which might help me understand if this is just an ordering issue or if I need to do something more drastic to the migration. And in a big migration with many edits it could be even more useful to have that extra info.

@rowanmiller rowanmiller added this to the 1.0.0 milestone Feb 2, 2016
@rowanmiller rowanmiller modified the milestones: 1.0.0, 1.0.1 May 13, 2016
@rowanmiller rowanmiller changed the title enhancement: verbose logging to include actual sql Migrations: verbose logging to include actual sql Jul 1, 2016
@rowanmiller rowanmiller removed the pri1 label Jul 1, 2016
@bricelam bricelam added the tools label Sep 8, 2016
@bricelam bricelam removed the tools label Sep 29, 2016
@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 5, 2016
@ajcvickers ajcvickers modified the milestones: 1.1.0-preview1, 1.1.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-enhancement
Projects
None yet
Development

No branches or pull requests

4 participants