-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Breaks on Azure SQL Db "sys.sp_addextendedproperty" #28
Comments
Well that's rather annoying! shame on microsoft for not supporting documentation any more. It might be better if the generated sql were to detect that it's running on sql rather than require the dev to know about this quirk. I'll take a look when I get a moment. If you'd like to do a pull request let me know and I'll hold off so we don't duplicate the effort. Thanks for reporting this. |
I'm happy to look at it. Just not sure what the best approach would be? Possibly using DbContext to open a connection and determine the version inside your GetDbHandler method? Not sure how this would affect MariaDB etc for your future enhancements? |
I'd want to do it in pure SQL because the library now supports generating a migration sql script for a DBA to run. Note to self: http://stackoverflow.com/questions/1375934/how-can-i-detect-which-version-of-sql-eg-sql-2008-or-sql-azure |
I seem to be rather short on time at the moment. |
http://stackoverflow.com/q/12458292/10245 - how to document schema for azure (you don't, ffs microsoft) so we're down to detecting if that proc exists and only using it if it does.
Ask the internet: http://dba.stackexchange.com/q/98867/33693 |
Hi Tim,
If you try and use it when deploying to Azure you will get the error "Could not find stored procedure 'sys.sp_addextendedproperty'. " (Azure SQL does not support this).
It looks as though you are only using this proc to add the "Automatically generated..." description. Could we add this as an option? So we can turn it off if deploying to Azure?
I downloaded code and removed the lines that add the description and tested deploying to Azure and works.
https://github.com/timabell/ef-enum-to-lookup/blob/master/EfEnumToLookup/LookupGenerator/SqlServerHandler.cs#L64-L65
Thanks.
The text was updated successfully, but these errors were encountered: