-
Notifications
You must be signed in to change notification settings - Fork 23
Bugfix and several new Features #30
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
Conversation
…objects and to avoid errors, when an object has later been dropped
Wow, this looks great @crazycrank ! Any chance you could update README to reflect details on these changes where it makes sense? @kkrol What do you think of these changes? |
Looks great.
W dniu czw., 14.06.2018 o 15:39 Brady Holt <notifications@github.com>
napisał(a):
Wow, this looks great @crazycrank <https://github.com/crazycrank> ! Any
chance you could update README to reflect details on these changes where it
makes sense?
@kkrol <https://github.com/kkrol> What do you think of these changes?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAN2MedD0A8X7UVXX3EC4zzJ85oGIQF6ks5t8md3gaJpZM4UnAvt>
.
--
--
Pozdrawiam
Krzysztof Król
|
@bradymholt I was just checking out the readme, but the only thing I updated was the addition of User Defined Types to the list of supported object types, since im mostly just extending. I can add some info about the supported statements (DROP IF EXISTS/CREATE OR ALTER) if you want, or add a list of known issues regarding the problems with renaming and later dropping items? Or what were you thinking about? |
@crazycrank Ah, makes sense. Yeah, a "Known Issues" section would be great. Thank you! Once you're able to add this, I can merge and push this out to NuGet. |
@bradymholt Awesome! I have added a list of known issues and also of supported statements. If there's anything else, just message me ;) |
Released as 2.1.0: https://www.nuget.org/packages/dbup-sqlserver-scripting/2.1.0 |
So, we required some features in the office for the dbup-scripter, since we are heavily dependent on database, and use the dbup pretty often. I decided it was probably easiest to implement them myself, so here we go.
Bugfixes:
Features
this last feature has been somewhat of a pain to implement, but I got it to run in the end. This lead to a pretty complicated regex. Also sp_rename allows the renaming of columns, indexes and keys, which I have not implemented, and am not sure how to best do that (it's certainly possible, but will require further changes). Also, to find out what type of object has been renamed, I need to scan the db context. This sadly also means, that if an object has been renamed and later dropped (or renamed again), its impossible to find out what object type needs to be scripted. In this case a warning gets printed in the end, to inform the user he has to check the file manually and delete it if necessary.
If you have any request for changes, please let me know. I have tried to keep my changes as clean as possible, but I'll gladly implement some feedback if we can use that in our code soon :)
Regards,
Max
Edit: by the way, I tested the changes on our database. Around 220 scripts with sometimes pretty elaborate migrations. Besides the above named problems regarding renaming of indexes and the like, and the problem when using sp_rename and later dropping the object, everything worked perfectly