Download the PHP package marekskopal/orm-migrations without Composer

On this page you can find all versions of the php package marekskopal/orm-migrations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package orm-migrations

ORM Migrations

Database migration library for marekskopal/orm. Automatically generates PHP migration files by comparing your ORM entity schema with the live database schema.

Supports MySQL and PostgreSQL.

Installation

Usage

Setup

For PostgreSQL, use PostgresDatabase instead of MySqlDatabase — no other changes needed.

An optional PSR-3 LoggerInterface can be passed as the third argument to Migrator to log migration execution.

Generate a migration

This compares the ORM entity schema against the live database and writes a new PHP migration file to the configured path. Only actual differences (added/changed/removed tables, columns, indexes, foreign keys) are included.

Example generated file:

Run migrations

Executes all pending migrations in order. Completed migrations are tracked in a __migrations table in the database.

TableBuilder API

Inside up() and down(), use $this->table(string $name) to get a TableBuilder. All methods are fluent and support both Type enum values and their string names.

Column operations

Index operations

Foreign key operations

Insert data

Available column types

Type enum MySQL PostgreSQL
Type::SmallInt smallint smallint
Type::Int int integer
Type::BigInt bigint bigint
Type::Decimal decimal decimal
Type::Float float real
Type::Double double precision double precision
Type::String varchar varchar
Type::Text text text
Type::Boolean tinyint(1) boolean
Type::Uuid uuid uuid
Type::Date date date
Type::DateTime datetime timestamp
Type::Timestamp timestamp timestamptz
Type::Json json json
Type::Enum enum(...) varchar + CHECK

Migration file naming

Generated files use a Ymd_His_ timestamp prefix (e.g. 20240101_120000_CreateUserTable.php). Migrations are executed in filename order, so this ensures correct sequencing even across branches.

License

MIT


All versions of orm-migrations with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
marekskopal/orm Version ^1.0
nette/php-generator Version ^4.1
psr/log Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package marekskopal/orm-migrations contains the following files

Loading the files please wait ...