@selfauth/migration
v0.20.0
Published
SelfAuth migration orchestration: adapter contract, SQL safety analysis, ownership manifest, and a Prisma adapter that drives native Prisma Migrate.
Downloads
4,481
Maintainers
Readme
@selfauth/migration
Migration orchestration for SelfAuth projects. It doesn't replace your migration tool; it drives the native one (Prisma Migrate) and adds safety analysis on top.
MigrationAdapter: the contract each database/ORM adapter implements (inspect,status,plan,migrate,generate,validate,rollback).PrismaMigrationAdapter: an implementation over the project's ownprismabinary.analyzeSql(),splitStatements()andcreatedObjects()flag statements that lose data (drops, type changes, renames), developer migrations that change SelfAuth's tables, and SelfAuth migrations that touch tables it doesn't own. The developer's own tables can be extended freely.manifestSchemadescribes theselfauth.manifest.jsonownership manifest.
This package is a development-time dependency of @selfauth/cli, and the
selfauth db … commands use it. Generated applications never import it. See
the repository.
