There is no license information available for the latest version (v1.0.1) of this package.

Simple Migration Application

v1.0.1 2022-04-06 11:44 UTC

This package is auto-updated.

Last update: 2024-09-23 13:42:09 UTC


README

An application for MySQL that can create database tables with the help of console in simple applications.

Installion

  composer require migration/app

Create migrate.php file.

Paste the following codes into the migrate file.

#!usr/bin/php
<?php

use SimpleMigration\Application;
use SimpleMigration\Database\Connection;

require __DIR__ . '/vendor/autoload.php';

$database = require __DIR__ . '/Database/database.php';

$connection = new Connection($database);

$app = new Application($connection, $argv);
$app->run();

Edit the database.php file according to your mysql database.

<?php

return [
    'connection' => 'mysql',
    'host' => 'localhost',
    'database' => 'migration_exam',
    'user' => 'root',
    'password' => 'root',
    'port' => 3306,
];

Command descriptions

Screenshots

php migrate

Migrate

php migrate create

Create

php migrate down

Down

Displays a warning if the migration name is left break.

Empty