webworld888/migrations/ConfigMigration.php
2021-10-26 19:14:12 +09:00

50 lines
1.4 KiB
PHP

<?php
/**
* ConfigMigration.php
*
* PHP version 7
*
* @category Migrations
* @package Xpressengine\Migrations
* @author XE Developers <developers@xpressengine.com>
* @copyright 2020 Copyright XEHub Corp. <https://www.xehub.io>
* @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html LGPL
* @link https://xpressengine.io
*/
namespace Xpressengine\Migrations;
use Illuminate\Database\Schema\Blueprint;
use Schema;
use Xpressengine\Support\Migration;
/**
* Class ConfigMigration
*
* @category Migrations
* @package Xpressengine\Migrations
* @author XE Developers <developers@xpressengine.com>
* @copyright 2020 Copyright XEHub Corp. <https://www.xehub.io>
* @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html LGPL
* @link https://xpressengine.io
*/
class ConfigMigration extends Migration
{
/**
* Run when install the application.
*
* @return void
*/
public function install()
{
Schema::create('config', function ($table) {
$table->engine = "InnoDB";
$table->string('site_key', 50)->default('default')->comment('site key. for multi web site support.');
$table->string('name', 255)->comment('site name');
$table->text('vars')->default('')->comment('setting values. JSON data type.');
$table->primary(['site_key', 'name']);
});
}
}