Config file change and cms_themes_contents table migration
This commit is contained in:
parent
7c919e01bc
commit
5dbfa133e7
|
|
@ -381,4 +381,30 @@ return [
|
|||
|
||||
'restrictBaseDir' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CMS Database Layer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enables the database layer for the CMS content files.
|
||||
|
|
||||
| Allowed values:
|
||||
| - false: Database layer is disabled, the FileDatasource is used
|
||||
| - true: Database layer is enabled, the AutoDatasource is used
|
||||
| - null: Setting equal to the inverse of app.debug: debug enabled, this disabled
|
||||
|
|
||||
| The database layer stores all modified CMS files in the database.
|
||||
| Files that are not modified continue to be loaded from the filesystem.
|
||||
| The `theme:sync $themeDir` console command is available to populate the
|
||||
| database from the filesystem with the `--toFile` flag to sync in the
|
||||
| other direction (database to filesystem) and the `--path="/path/to/file.md"
|
||||
| flag to sync only a specific file.
|
||||
|
|
||||
| Files available in the database are cached to indicate that they should
|
||||
| be loaded from the database.
|
||||
|
|
||||
*/
|
||||
|
||||
'enableDatabaseLayer' => false,
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
use October\Rain\Database\Schema\Blueprint;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class DbCmsThemeContents extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('cms_theme_contents', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('source')->index();
|
||||
$table->string('path')->index();
|
||||
$table->longText('content');
|
||||
$table->integer('file_size')->unsigned();
|
||||
$table->dateTime('updated_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('cms_theme_contents');
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue