Create the SDK-style DACPAC project (Microsoft.Build.Sql, default schema data) that owns all domain tables and processing sprocs, and wire it into the existing GitHub Actions pipeline following Walter's pattern.
Implementation
- Create the
.sqlproj with a data schema and folders for tables/sprocs/functions.
- Build: build the
.sqlproj and upload the .dacpac as an artifact.
- Deploy test (auto on push):
sqlpackage /Action:Publish to the test Azure SQL DB using existing SQL_ADMIN_LOGIN/SQL_ADMIN_PASSWORD, with DropObjectsNotInSource=false.
- Deploy prod (gated): publish a
/Action:Script artifact for review, then publish behind the manual deploy_prod / prod Environment gate.
Schema split (DACPAC owns data, EF owns app)
- DACPAC =
data (domain tables + sprocs); EF = app (Run/RunStep/ImportLog control state). Schema prefix is the ownership token.
- EF confined to
app (HasDefaultSchema("app"), app code reads data via Dapper); DACPAC confined to data (DropObjectsNotInSource=false). References point app → data only.
- Sprocs are parameter-in/results-out, never touch
app, and are idempotent (app orchestrates exclusively).
- CI: fail build if EF migrations reference
data. or the .sqlproj references app..
Related: #6 (tables), #7 (import).
Create the SDK-style DACPAC project (
Microsoft.Build.Sql, default schemadata) that owns all domain tables and processing sprocs, and wire it into the existing GitHub Actions pipeline following Walter's pattern.Implementation
.sqlprojwith adataschema and folders for tables/sprocs/functions..sqlprojand upload the.dacpacas an artifact.sqlpackage /Action:Publishto the test Azure SQL DB using existingSQL_ADMIN_LOGIN/SQL_ADMIN_PASSWORD, withDropObjectsNotInSource=false./Action:Scriptartifact for review, then publish behind the manualdeploy_prod/prodEnvironment gate.Schema split (DACPAC owns
data, EF ownsapp)data(domain tables + sprocs); EF =app(Run/RunStep/ImportLog control state). Schema prefix is the ownership token.app(HasDefaultSchema("app"), app code readsdatavia Dapper); DACPAC confined todata(DropObjectsNotInSource=false). References pointapp → dataonly.app, and are idempotent (app orchestrates exclusively).data.or the.sqlprojreferencesapp..Related: #6 (tables), #7 (import).