God of database migration libraries

Related tags

Database migratos
Overview

Migratos

Migratos is a migration library for legacy projects.

Installation

You can install migratos via composer and then you have to register to your console application or you can write your own run script. Migratos will waits a PDO connection instance to start to work. There is symfony/console based application script included in src/Command/MigrationCommand.php file. You can review that file to write your own cli script until Migratos API document ready.

composer require 7cups/migratos

Usage

You have register console command.

<?php

require_once(__DIR__.'/vendor/autoload.php');

use SevenCupsMigratos\Command\MigrationCommand;
use Symfony\Component\Console\Application;

$db = new \PDO('sqlite:./test.db');

$application = new Application('7Cups Console','1.0');

$application->add(new MigrationCommand($db));
$application->run();

Console Commands

There is a predefined symfony console app exists for that library. This is the basic descriptions of commands. Also you will see same output when you run app:migration -h command.

Usage:
  app:migration [options]

Options:
  -u, --up                 Runs newest migrations
  -d, --rollback=ROLLBACK  It will runs down migrations until reach the given timestamp
  -i, --init               First it will run base.sql and then all migrations.
  -b, --base               It will produce a base.sql file which contains migration table schema.
  -c, --new                It will produce draft migration files.
  -h, --help               Display help for the given command. When no command is given display help for the list command
  -q, --quiet              Do not output any message
  -V, --version            Display this application version
      --ansi               Force ANSI output
      --no-ansi            Disable ANSI output
  -n, --no-interaction     Do not ask any interactive question
  -v|vv|vvv, --verbose     Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

You might also like...
Adjacency List’ed Closure Table database design pattern implementation for the Laravel framework.

ClosureTable This is a database manipulation package for the Laravel 5.4+ framework. You may want to use it when you need to store and operate hierarc

A drop-in library for certain database functionality in Laravel, that allows for extra features that may never make it into the main project.

Eloquence Eloquence is a package to extend Laravel's base Eloquent models and functionality. It provides a number of utilities and classes to work wit

Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.

Laravel Migrations Generator Generate Laravel Migrations from an existing database, including indexes and foreign keys! Upgrading to Laravel 5.4 Pleas

[Package] Multi-tenant Database Schema Manager for Laravel

Multi-tenant Database Schema Manager for Laravel Tenanti allow you to manage multi-tenant data schema and migration manager for your Laravel applicati

Laravel 5 - Repositories to abstract the database layer

Laravel 5 Repositories Laravel 5 Repositories is used to abstract the data layer, making our application more flexible to maintain. See versions: 1.0.

A Redis based, fully automated and scalable database cache layer for Laravel
A Redis based, fully automated and scalable database cache layer for Laravel

Lada Cache A Redis based, fully automated and scalable database cache layer for Laravel Contributors wanted! Have a look at the open issues and send m

A php class for managing and connecting to a database

Query builder class php This class is responsible for creating and executing sql commands and helps you to execute as easily as possible and safely. I

Adminer database management tool for your Laravel application.

Laravel Adminer Adminer database management tool for your Laravel application. Table of Contents Introduction Features Installation CSRF token middlew

A mysql database backup package for laravel

Laravel Database Backup Package This package will take backup your mysql database automatically via cron job. Installing laravel-backup The recommende

Comments
  • fixes/170822

    fixes/170822

    Change description

    • added ; sign after base query
    • added file names to up-down file create action

    Type of change

    • [x] Bug fix (fixes an issue)
    • [ ] New feature (adds functionality)

    Related issues

    Fix #1

    Checklists

    Development

    • [ ] Lint rules pass locally
    • [ ] Application changes have been tested thoroughly
    • [ ] Automated tests covering modified code pass

    Security

    • [ ] Security impact of change has been considered
    • [ ] Code follows company security practices and guidelines

    Code review

    • [ ] Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
    • [ ] "Ready for review" label attached and reviewers assigned
    • [ ] Changes have been reviewed by at least one other contributor
    • [ ] Pull request linked to task tracker where applicable
    opened by delirehberi 0
  • version update

    version update

    Change description

    Description here

    Type of change

    • [ ] Bug fix (fixes an issue)
    • [ ] New feature (adds functionality)

    Related issues

    Fix #1

    Checklists

    Development

    • [ ] Lint rules pass locally
    • [ ] Application changes have been tested thoroughly
    • [ ] Automated tests covering modified code pass

    Security

    • [ ] Security impact of change has been considered
    • [ ] Code follows company security practices and guidelines

    Code review

    • [ ] Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
    • [ ] "Ready for review" label attached and reviewers assigned
    • [ ] Changes have been reviewed by at least one other contributor
    • [ ] Pull request linked to task tracker where applicable
    opened by delirehberi 0
  • fixed unstarted transaction bug

    fixed unstarted transaction bug

    Change description

    Description here

    Type of change

    • [ ] Bug fix (fixes an issue)
    • [ ] New feature (adds functionality)

    Related issues

    Fix #1

    Checklists

    Development

    • [ ] Lint rules pass locally
    • [ ] Application changes have been tested thoroughly
    • [ ] Automated tests covering modified code pass

    Security

    • [ ] Security impact of change has been considered
    • [ ] Code follows company security practices and guidelines

    Code review

    • [ ] Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
    • [ ] "Ready for review" label attached and reviewers assigned
    • [ ] Changes have been reviewed by at least one other contributor
    • [ ] Pull request linked to task tracker where applicable
    opened by delirehberi 0
Owner
7Cups
7Cups
Pure PHP NoSQL database with no dependency. Flat file, JSON based document database.

Please give it a Star if you like the project ?? ❤️ SleekDB - A NoSQL Database made using PHP Full documentation: https://sleekdb.github.io/ SleekDB i

Kazi Mehedi Hasan 745 Jan 7, 2023
SleekwareDB is a NoSQL database storage service. A database storage service that can be used for various platforms and is easy to integrate.

SleekwareDB is a NoSQL database storage service. A database storage service that can be used for various platforms and is easy to integrate. NoSQL API

SleekwareDB 12 Dec 11, 2022
The lightweight PHP database framework to accelerate development

The lightweight PHP database framework to accelerate development Features Lightweight - Less than 100 KB, portable with only one file Easy - Extremely

Angel Lai 4.6k Dec 28, 2022
[READ ONLY] Subtree split of the Illuminate Database component (see laravel/framework)

Illuminate Database The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style OR

The Laravel Components 2.5k Dec 27, 2022
ORM layer that creates models, config and database on the fly

RedBeanPHP 5 RedBeanPHP is an easy to use ORM tool for PHP. Automatically creates tables and columns as you go No configuration, just fire and forget

Gabor de Mooij 2.2k Jan 9, 2023
Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer

Spot DataMapper ORM v2.0 Spot v2.x is built on the Doctrine DBAL, and targets PHP 5.4+. The aim of Spot is to be a lightweight DataMapper alternative

Spot ORM 602 Dec 27, 2022
SQL database access through PDO.

Aura.Sql Provides an extension to the native PDO along with a profiler and connection locator. Because ExtendedPdo is an extension of the native PDO,

Aura for PHP 533 Dec 30, 2022
PHP Database Migrations for Everyone

Phinx: Simple PHP Database Migrations Intro Phinx makes it ridiculously easy to manage the database migrations for your PHP app. In less than 5 minute

CakePHP 4.3k Jan 7, 2023
Database management in a single PHP file

Adminer - Database management in a single PHP file Adminer Editor - Data manipulation for end-users https://www.adminer.org/ Supports: MySQL, MariaDB

Jakub Vrána 5.5k Jan 1, 2023
Doctrine Database Abstraction Layer

Doctrine DBAL 4.0-dev 3.0 2.13 N/A N/A Powerful database abstraction layer with many features for database schema introspection, schema management and

Doctrine 8.9k Dec 28, 2022