SQL Server Schemas: dbo, Ownership and How Migration Tools Handle Them
What a schema is in SQL Server, why everything lands in dbo, how default schemas work, and how Flyway, Liquibase, EF Core, DbUp and FluentMigrator target schemas.
Run your migrations on a real SQL Server 2017, 2019, 2022, 2025 in Docker and get the resulting schema as an SVG. 17 migration tools can draw on SQL Server.
Pass the version as the version field with databaseType=MSSQL. Each one is a stock image, started fresh for every drawing.
| Version | Image |
|---|---|
2017 | mcr.microsoft.com/mssql/server:2017-latest |
2019 | mcr.microsoft.com/mssql/server:2019-latest |
2022 | mcr.microsoft.com/mssql/server:2022-latest |
2025 | mcr.microsoft.com/mssql/server:2025-latest |
Tables land in dbo unless the migration says otherwise. SQL Server takes longer to start than the other engines, so the first seconds of a drawing are spent waiting for it.
The types are the names the engine's JDBC metadata reports, without lengths: an integer column reads int, a short text varchar, a calendar date date. Tables are read from dbo; the migration tool's own bookkeeping table is left out.
The PetClinic sample, drawn from Flyway migrations on Microsoft SQL Server 2025. Open the SVG.
The same request works for every tool; only migrationType and the files change.
curl -X POST https://schemadrawer.com/api/v1/drawing \
-H "Request-Id: $(uuidgen)" \
-F "userId=5f0c1d2e-3a4b-4c5d-8e6f-7a8b9c0d1e2f" \
-F "migrationType=FLYWAY" \
-F "databaseType=MSSQL" \
-F "version=2025" \
-F "files=@db/migration/V1__create_owners_and_pets.sql" \
-F "files=@db/migration/V2__create_vets.sql" \
-F "files=@db/migration/V3__create_visits.sql"
# {"jobId":"0b6e2f4c-8d1a-4c3e-9f7a-2a5b6c7d8e9f"}
- uses: schemadrawercom/action@v1
with:
sql-directory: db/migration
output-path: docs/schema-diagram.svg
migration-type: FLYWAY
database-type: MSSQL
database-version: '2025'
github-token: ${{ secrets.GITHUB_TOKEN }}
What a schema is in SQL Server, why everything lands in dbo, how default schemas work, and how Flyway, Liquibase, EF Core, DbUp and FluentMigrator target schemas.
A practical guide to column types in PostgreSQL, MySQL, SQL Server, Oracle and SQLite: strings, timestamps, money, booleans, JSON, enums and what diagrams report.
Which engines run DDL in transactions (PostgreSQL, SQL Server, SQLite), which commit implicitly (MySQL, MariaDB, Oracle), and how to write migrations for both.
Upload the migration directory, pick the version you deploy to, get an SVG back.