https://github.com/atrakic/azure-sql-deploy-dacpac
SQL project with dacpac package deployment.
https://github.com/atrakic/azure-sql-deploy-dacpac
sql sql-server sqlproject
Last synced: 4 months ago
JSON representation
SQL project with dacpac package deployment.
- Host: GitHub
- URL: https://github.com/atrakic/azure-sql-deploy-dacpac
- Owner: atrakic
- License: mit
- Created: 2024-09-19T09:32:34.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-14T23:52:34.000Z (7 months ago)
- Last Synced: 2025-01-20T17:16:49.969Z (5 months ago)
- Topics: sql, sql-server, sqlproject
- Language: TSQL
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# azure-sql-deploy-dacpac
[](https://github.com/atrakic/azure-sql-deploy-dacpac/blob/main/LICENSE)
[](https://github.com/atrakic/azure-sql-deploy-dacpac/actions/workflows/ci.yml)## Overview
> This project demonstrates how to automate test a star schema development with 'microsoft.sqlpackage' using a GitHub Actions & Docker.
## Flow
1. Build SQL server objects (tables, views, and instance objects)
2. Dacpack file is created
3. Contents of dacpac is consumed by Github Actions
4. Deploy against a SQL database## Deployment prerequisites
- Azure Subscription## Setup
1. Create a new Azure Service Principal
2. Create a new Azure SQL Database, see infra [Makefile](./infra/Makefile) for more details.## Configuration
1. Add the following secrets to your GitHub repository:
- `AZURE_SQL_CONNECTION_STRING` - Azure SQL Database connection string of your database## Azure Deployment
1. Run database deployment from github actions tab. See [deploy.yml](.github/workflows/deploy.yml)## Local development environment
To run sql project in Docker, follow these steps:1. Build and start the necessary containers
```bash
make docker
```2. Examine the logs
```bash
docker compose logs -f
```