Switch to custom Schema facade
Updates the Schema facade to point to the custom one added in the library repo, and sets all existing migrations to use our own Blueprint class instead of the one provided by the Laravel framework.
This commit is contained in:
parent
28a8f84692
commit
34f2aa7dcf
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbBackendUsers extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_users', function ($table) {
|
||||
Schema::create('backend_users', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('first_name')->nullable();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbBackendUserGroups extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_user_groups', function ($table) {
|
||||
Schema::create('backend_user_groups', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('name')->unique('name_unique');
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbBackendUsersGroups extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_users_groups', function ($table) {
|
||||
Schema::create('backend_users_groups', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->integer('user_group_id')->unsigned();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbBackendUserThrottle extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_user_throttle', function ($table) {
|
||||
Schema::create('backend_user_throttle', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned()->nullable()->index();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbBackendUserPreferences extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_user_preferences', function ($table) {
|
||||
Schema::create('backend_user_preferences', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbBackendAccessLog extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_access_log', function ($table) {
|
||||
Schema::create('backend_access_log', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbBackendAddDescriptionField extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('backend_user_groups', function ($table) {
|
||||
Schema::table('backend_user_groups', function (Blueprint $table) {
|
||||
$table->string('code')->nullable()->index('code_index');
|
||||
$table->text('description')->nullable();
|
||||
$table->boolean('is_new_user_default')->default(false);
|
||||
|
|
@ -15,7 +16,7 @@ class DbBackendAddDescriptionField extends Migration
|
|||
|
||||
public function down()
|
||||
{
|
||||
// Schema::table('backend_user_groups', function ($table) {
|
||||
// Schema::table('backend_user_groups', function (Blueprint $table) {
|
||||
// $table->dropColumn('code');
|
||||
// $table->dropColumn('description');
|
||||
// $table->dropColumn('is_new_user_default');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
use Backend\Models\User as AdminModel;
|
||||
|
||||
|
|
@ -7,7 +8,7 @@ class DbBackendAddSuperuserFlag extends Migration
|
|||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('backend_users', function ($table) {
|
||||
Schema::table('backend_users', function (Blueprint $table) {
|
||||
$table->boolean('is_superuser')->default(false);
|
||||
});
|
||||
|
||||
|
|
@ -21,7 +22,7 @@ class DbBackendAddSuperuserFlag extends Migration
|
|||
|
||||
public function down()
|
||||
{
|
||||
// Schema::table('backend_users', function ($table) {
|
||||
// Schema::table('backend_users', function (Blueprint $table) {
|
||||
// $table->dropColumn('is_superuser');
|
||||
// });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbCmsThemeData extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('cms_theme_data', function ($table) {
|
||||
Schema::create('cms_theme_data', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('theme')->nullable()->index();
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ return [
|
|||
'Request' => Illuminate\Support\Facades\Request::class,
|
||||
'Response' => Illuminate\Support\Facades\Response::class,
|
||||
'Route' => Illuminate\Support\Facades\Route::class,
|
||||
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||
'Session' => Illuminate\Support\Facades\Session::class,
|
||||
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||
'Url' => Illuminate\Support\Facades\URL::class, // Preferred
|
||||
|
|
@ -52,6 +51,7 @@ return [
|
|||
'Ini' => October\Rain\Support\Facades\Ini::class,
|
||||
'Twig' => October\Rain\Support\Facades\Twig::class,
|
||||
'DbDongle' => October\Rain\Support\Facades\DbDongle::class,
|
||||
'Schema' => October\Rain\Support\Facades\Schema::class,
|
||||
'Backend' => Backend\Facades\Backend::class,
|
||||
'BackendMenu' => Backend\Facades\BackendMenu::class,
|
||||
'BackendAuth' => Backend\Facades\BackendAuth::class,
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbDeferredBindings extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('deferred_bindings', function ($table) {
|
||||
Schema::create('deferred_bindings', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('master_type')->index();
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemFiles extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('system_files', function ($table) {
|
||||
Schema::create('system_files', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('disk_name');
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemPluginVersions extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('system_plugin_versions', function ($table) {
|
||||
Schema::create('system_plugin_versions', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('code')->index();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemPluginHistory extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('system_plugin_history', function ($table) {
|
||||
Schema::create('system_plugin_history', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('code')->index();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemSettings extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('system_settings', function ($table) {
|
||||
Schema::create('system_settings', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('item')->nullable()->index();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemParameters extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('system_parameters', function ($table) {
|
||||
Schema::create('system_parameters', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('namespace', 100);
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemAddDisabledFlag extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('system_plugin_versions', function ($table) {
|
||||
Schema::table('system_plugin_versions', function (Blueprint $table) {
|
||||
$table->boolean('is_disabled')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('system_plugin_versions', function ($table) {
|
||||
Schema::table('system_plugin_versions', function (Blueprint $table) {
|
||||
$table->dropColumn('is_disabled');
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemMailTemplates extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('system_mail_templates', function ($table) {
|
||||
Schema::create('system_mail_templates', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('code')->nullable();
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemMailLayouts extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('system_mail_layouts', function ($table) {
|
||||
Schema::create('system_mail_layouts', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbJobs extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jobs', function ($table) {
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue');
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemEventLogs extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('system_event_logs', function ($table) {
|
||||
Schema::create('system_event_logs', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('level')->nullable()->index();
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemRequestLogs extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('system_request_logs', function ($table) {
|
||||
Schema::create('system_request_logs', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('status_code')->nullable();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemSessions extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
|
|
@ -12,7 +12,7 @@ class DbSystemSessions extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sessions', function ($table) {
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->unique();
|
||||
$table->text('payload')->nullable();
|
||||
$table->integer('last_activity')->nullable();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use System\Models\MailLayout;
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemMailLayoutRename extends Migration
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemAddFrozenFlag extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('system_plugin_versions', function ($table) {
|
||||
Schema::table('system_plugin_versions', function (Blueprint $table) {
|
||||
$table->boolean('is_frozen')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('system_plugin_versions', function ($table) {
|
||||
Schema::table('system_plugin_versions', function (Blueprint $table) {
|
||||
$table->dropColumn('is_frozen');
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbCache extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('cache', function ($table) {
|
||||
Schema::create('cache', function (Blueprint $table) {
|
||||
$table->string('key')->unique();
|
||||
$table->text('value');
|
||||
$table->integer('expiration');
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemRevisions extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('system_revisions', function ($table) {
|
||||
Schema::create('system_revisions', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned()->nullable()->index();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbFailedJobs extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function ($table) {
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->text('connection');
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbSystemPluginHistoryDetailText extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('system_plugin_history', function ($table) {
|
||||
Schema::table('system_plugin_history', function (Blueprint $table) {
|
||||
$table->text('detail')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('system_plugin_history', function ($table) {
|
||||
Schema::table('system_plugin_history', function (Blueprint $table) {
|
||||
$table->string('detail')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue