2017 © Pedro Peláez
 

yii2-extension yii2-dumpling

Dump and restore databases in Yii2.

image

herroffizier/yii2-dumpling

Dump and restore databases in Yii2.

  • Thursday, March 24, 2016
  • by herroffizier
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2 Dumpling

Build Status Scrutinizer Code Quality Code Coverage, (*1)

Yii2 Dumpling is a simple Yii2 extension for dumping and restoring databases., (*2)

Installation

Install extension with Composer:, (*3)

composer require "herroffizier/yii2-dumpling:@stable"

Update your app config:, (*4)

// Add module to bootstrap
'bootstrap' => [

    // ...

    'dumpling',

    // ...

],

// Add module to app
'modules' => [

    // ...

    'dumpling' => [
        'class' => 'herroffizier\yii2dumpling\Module',
    ],

    // ...

],

And you're done., (*5)

Usage

Currently only MySQL databases are supported., (*6)

API

To dump database:, (*7)

Yii::$app->dumpling->dump();

To restore database:, (*8)

Yii::$app->dumpling->restore();

By default Dumpling uses db as database component and @app/runtime/dump.sql as dump file name. These values may be customized either by module config or by method arguments. Refer to source code for details., (*9)

In case of error yii\base\Exception will be thrown., (*10)

Console

You also may use Dumpling in a console., (*11)

To dump:, (*12)

php yii dumpling/dump

To restore:, (*13)

php yii dumpling/restore

Both commands supports --file and --db options for setting dump file name and database component accordingly., (*14)

The Versions

24/03 2016

dev-develop

dev-develop

Dump and restore databases in Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 yii yii 2 mysql db dump mysqldump