sentgine/migration

A standalone database migration library for PHP.

v1.0.2 2024-05-15 07:52 UTC

This package is auto-updated.

Last update: 2024-05-16 10:25:36 UTC


README

License Latest Stable Version Total Downloads

This PHP tool represents a standalone migration script for creating and altering tables in a MySQL database.This migration script is designed to be used independently to manage database migrations. It utilizes the Arise command line tool to execute various migration-related tasks.

Upcoming Support for PostGreSQL and SQLite:

Note: Support for PostGreSQL and SQLite is currently in development and will be available soon. Stay tuned for updates on these additional database platforms!

Requirements

  • PHP 8.1.17 or higher.

Available Commands

  • migrate: Run the database migrations.
  • make:migration: Create a migration file.
  • migrate:fresh: Drop all tables and re-run all migrations.
  • migrate:rollback: Rollback the last database migration.

(1) You can install the package via Composer to your existing PHP project by running the following command:

composer require sentgine/migration:^1.0.0

(2) In the root directory of your project, please run:

./vendor/sentgine/migration/initialize

This will create the executable "arise" command on your project.

(3) In the root directory of your project, you can run:

php arise

This will display a list of available commands that you can use to manage your database migrations efficiently.

Changelog

Please see the CHANGELOG file for details on what has changed.

Security

If you discover any security-related issues, please email sentgine@gmail.com instead of using the issue tracker.

Credits

Migration is built and maintained by Adrian Navaja.

  • Check out some cool tutorials and stuff on YouTube!
  • Catch my latest tweets and updates on Twitter (formerly X)!
  • Let's connect on a more professional note over on LinkedIn!
  • For more information about me and my work, visit my website: sentgine.com.

License

The MIT License (MIT). Please see the LICENSE file for more information.