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

Is RefactorLog supported? #596

Closed
jbennink opened this issue Jul 31, 2024 · 5 comments · Fixed by #641
Closed

Is RefactorLog supported? #596

jbennink opened this issue Jul 31, 2024 · 5 comments · Fixed by #641
Labels
documentation Improvements or additions to documentation

Comments

@jbennink
Copy link

The .sqlproj has support for RefactorLog. Somehow when your rename columns in the visual editor it generates this file which is also included in the project as:

 <ItemGroup>
    <RefactorLog Include="CallProSQL.refactorlog" />
  </ItemGroup>

But I cannot add this to the SDK style project.

So I guess this means there is no native support for handling column renames in the SDK style project? I should do it myself in a pre-deployment step? and craft the sp_rename myself, but then I also have to handle whether it is needed, that seems boilerplate?

P.S. I always found this RefactorLog file a bit scary but it works very well, and seems to do something similar (but simpler) as EF MigrationHistory.

@ErikEJ
Copy link
Collaborator

ErikEJ commented Jul 31, 2024

You can use a .sqlproj companion project for managing the refactorlog, and it will be used, this was added here: #47 (but it looks like it was not really documented)

@jbennink
Copy link
Author

You can use a .sqlproj companion project for managing the refactorlog, and it will be used, this was added here: #47 (but it looks like it was not really documented)

What doe you mean an .sqlproj companion project. I have the original .refactorlog file, how would I put it in the SDK project so that the bacpac generated uses it.

@ErikEJ
Copy link
Collaborator

ErikEJ commented Jul 31, 2024

See this: https://github.com/rr-wfm/MSBuild.Sdk.SqlProj/tree/master/test/TestProjectWithPrePost - again, leaving this open to actually get it documented

@ErikEJ ErikEJ added the documentation Improvements or additions to documentation label Jul 31, 2024
@jbennink
Copy link
Author

jbennink commented Jul 31, 2024

DELETED due to typo in file :-(

@jbennink
Copy link
Author

jbennink commented Jul 31, 2024

@ErikEJ Forget about my previous post. I switch windows a lot and sometimes windows 11 :-( just sets the focus to a window when I think it is in another and I start typing. Somehow my refactorlog included "notepad" as the first chacacter :-( Which made the file invalid. I will remove the content from my last post.

It now builds fine :-)

ErikEJ added a commit to ErikEJ/MSBuild.Sdk.SqlProj that referenced this issue Oct 15, 2024
ErikEJ added a commit to ErikEJ/MSBuild.Sdk.SqlProj that referenced this issue Oct 15, 2024
@ErikEJ ErikEJ closed this as completed in fed1206 Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants