Run SQL script after deploy
Hi, Can anyone show how I can do this for .net framework?
Thanks
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 13 Nov, 2014 02:00 AM
What deployment method do you use?
2 Posted by mark.garcia on 13 Nov, 2014 02:02 AM
We're using the appveyor agent for deployment.
Support Staff 3 Posted by Feodor Fitsner on 13 Nov, 2014 02:21 AM
You can put database update logic into
deploy.ps1
script.Regarding the way of running SQL script - you can run bare SQL commands from PowerShell or try SSDT projects.aspx).
A sample project for SSDT (it contains some test PS commands working with DB too):
https://github.com/FeodorFitsner/dacpac-sample/blob/master/appveyor...
4 Posted by mark.garcia on 13 Nov, 2014 04:26 AM
Thank you, I tried to create a very basic ps to create a text after the deploy and I don't see the file created anywhere. I set it up under project > settings > deploy then choose ps under after deploy. Or should I just create a deploy.ps1 file?
Support Staff 5 Posted by Feodor Fitsner on 13 Nov, 2014 04:27 AM
Yeah, it should be
deploy.ps1
in the root of your web application... and which is part of the project.6 Posted by mark.garcia on 13 Nov, 2014 04:32 AM
Thank you so much. I'll do that then. thanks
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:50 AM.