4d-schema-migrationlisted
Install: claude install-skill michaelalber/ai-toolkit
# 4D to .NET/SQL Server Migration
> "Data is a precious thing and will last longer than the systems themselves."
> -- Tim Berners-Lee
This skill guides migration from 4D (4th Dimension) applications to modern
.NET 10 + SQL Server 2022 + Blazor architecture.
## Core Philosophy
4D is **not just a database** — it is a complete application development platform
encompassing a relational database engine, a visual forms designer, a proprietary
programming language, triggers, and a built-in user/group security model. Migrating
from 4D is fundamentally harder than a typical database-to-database migration because
you are migrating an *entire runtime*: data types, business logic, UI forms, validation
rules, and security semantics all at once.
A naive "export tables, import rows" approach will fail. 4D has data types with no direct
SQL Server equivalent (multi-value fields, subtables, Pictures stored as proprietary
binary), stores dates and times as separate platform-specific values, has NULL semantics
that differ from SQL Server, and uses internal record numbers that can be reused after
deletion. Treat the migration as a full-stack platform transition — data types first, then
schema, then business logic, then forms — with validation gates between every phase.
The full domain-principle set, AI discipline rules, anti-pattern catalog, and knowledge-base
query-to-phase lookup live in `references/common-4d-patterns.md`; per-phase validation
checklist and error-recovery procedures live