Minor Changes
-
Added
Database.wipe(),Database.migrate(),Database.migrationStatus(),Database.reset(), andDatabase.close()along with the typedrunRemixDb()API fromremix/data-table/cli.Database.migrate()supports forward and backward directions, mutually exclusivetoandstepbounds, dry runs, and custom journal tables. Migration status reports applied journal entries missing from the current migration set without creating an absent journal table; forward runs reject missing applied migrations before executing SQL, while backward runs skip orphaned journal entries so migrations that are still present can be rolled back. Concrete databases release internally owned connections withclose(), andloadSeed()fromremix/data-table/migrations/nodeloads a SQL seed file as aSeedfunction (see #11608, #11639).BREAKING CHANGE:
runRemixDb()now accepts resolvedDatabase,Migrations, andSeedvalues in a command-discriminated options union. The publiccreateMigrationRunner(),MigrationRunner,MigrationRunnerOptions, andGetMigrationsAPIs were removed; useDatabase.migrate()andDatabase.migrationStatus().MigrateOptionswas replaced byDatabaseMigrateOptions, withDatabaseMigrationStatusOptionsandDatabaseResetOptionscovering the other lifecycle methods.BREAKING CHANGE: Replaced public adapter classes and factories with concrete database factories. Use
createPostgresDatabase(),createMysqlDatabase(), orcreateSqliteDatabase()instead ofcreateDatabase(create*DatabaseAdapter()).Databaseis now the canonical public class and instance type. Integration packages extendDatabase, implement a composedDatabaseDriver, and pass that private driver tosuper(). The database object exposes its dialect, immutable capabilities, table checks, and column checks directly. TheDatabaseAdapter,AdapterCapabilities, andAdapterCapabilityOverridestypes were replaced byDatabaseDriver, which requireswipe()and an idempotentclose(). ThecreateDatabase()helper, built-in adapter exports, anddb.adapterescape hatch were removed. Individual operation types such asSelectOperationandInsertOperationare no longer exported; derive them from the exported union instead, for exampleExtract<DataManipulationOperation, { kind: 'select' }>.DataTableAdapterErrorwas renamed toDataTableDatabaseErrorto match the new API.Database integration packages can import
Database,DatabaseDriver, and the supporting driver protocol types directly fromremix/data-table; applications should use a concrete dialect factory.