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

Database deployment such as azd deploy DBSchema would be nice #4792

Open
crpietschmann opened this issue Feb 13, 2025 · 1 comment
Open

Database deployment such as azd deploy DBSchema would be nice #4792

crpietschmann opened this issue Feb 13, 2025 · 1 comment
Labels
customer-reported identify a customer issue question

Comments

@crpietschmann
Copy link

It would be nice if you could setup a Service in the azure.yaml to be able to run database schema scripts. This would enable azd deploy DBSchema for example to be run to deploy database changes only. Also, you could setup an 'App' service to be dependent on the 'DBSchema' service to be deployed first when running an azd up.

Currently, however, the only way to deploy database schema is to use on of the postprovision or postdeploy hooks to run the scripts to deploy the database schema after the provision step ran the Azure Bicep to provision the database.

AZD is a great tool, but it's lack of supporting database deployments, or even just the ability to setup a 'script' service to create custom Deployments, makes this tool a bit cumbersome when it comes to database deployments.

@Menghua1
Copy link
Member

Menghua1 commented Feb 19, 2025

@crpietschmann Currently Azd does not support azd deploy DBSchema to run database schema scripts, but you can use the resource Microsoft.Resources/deploymentScripts@2020-10-01 to run custom database schema scripts. This resource can execute any scripts you need during the provision process.

I hope this information is helpful to you. If you have other questions or need further help, please feel free to ask us.

CC:@rajeshkamal5050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported identify a customer issue question
Projects
None yet
Development

No branches or pull requests

2 participants