-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #3000 メールメッセージや、カスタムエントリーのバックアップができない問題を改善
- Loading branch information
Showing
2 changed files
with
125 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
plugins/bc-custom-content/config/Migrations/20230107045842_CreateCustomEntries.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use BaserCore\Database\Migration\BcMigration; | ||
|
||
class CreateCustomEntries extends BcMigration | ||
{ | ||
/** | ||
* Up Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-up-method | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
$this->table('custom_entries', [ | ||
'collation' => 'utf8mb4_general_ci' | ||
]) | ||
->addColumn('custom_table_id', 'integer', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('parent_id', 'integer', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('name', 'text', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('title', 'string', [ | ||
'default' => null, | ||
'limit' => 255, | ||
'null' => true, | ||
]) | ||
->addColumn('level', 'integer', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('lft', 'integer', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('rght', 'integer', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('creator_id', 'integer', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('status', 'boolean', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('publish_begin', 'datetime', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('publish_end', 'datetime', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('published', 'datetime', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('created', 'datetime', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->addColumn('modified', 'datetime', [ | ||
'default' => null, | ||
'limit' => null, | ||
'null' => true, | ||
]) | ||
->create(); | ||
} | ||
|
||
/** | ||
* Down Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-down-method | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
$this->table('custom_entries')->drop()->save(); | ||
} | ||
} |