upscheme
Database migrations and schema updates made easy
What is upscheme?
Database migrations and schema updates made easy
Overview of upscheme
What it is
Upscheme is a PHP package for updating database schemas and migrating data between versions. It uses Doctrine DBAL to abstract different database implementations, offering an API that requires minimal code compared to raw DBAL usage. Migrations are schema-based rather than version-tracked, allowing upgrades from any database state without relying on a migration history table.
Key features
- Minimal code required for defining tables, columns, indexes, foreign keys, sequences, and custom SQL - Supports dependencies between migration tasks via
before()andafter()methods, enabling compatibility with third-party extensions - Works with MySQL, MariaDB, PostgreSQL, SQLite, SQL Server, DB2, Oracle, and SQL Anywhere - Only performs schema upgrades (no downgrades) to prevent implicit data loss - Relies on the actual database schema for state detection, avoiding out-of-sync records - Allows custom configuration transformation viamacro()method
Use cases
- Automating database schema changes in PHP applications during continuous deployment - Managing schema updates for applications that support third-party extensions with interdependent migrations - Ensuring consistent database states across different environments (development, staging, production)
Getting started
Install via Composer: bash composer req aimeos/upscheme Example usage: php $config = [ 'driver' => 'pdo_mysql', 'host' => '127.0.0.1', 'dbname' => '', 'user' => '', 'password' => '' ]; AimeosUpschemeUp::use( $config, 'src/migrations' )->up();
License and pricing
License: LGPL-3.0. Pricing: open source (free).
Based on the project's public README and repository metadata.