【发布时间】:2018-05-12 17:20:11
【问题描述】:
我是 10 月份的新手,遇到了一个我无法解决的问题。当我从命令行创建插件并运行 plugin:refresh 时,不会创建数据库中的表。
根据文档,version.yaml 是正确的。以下是文件的内容。 插件/Mejlak/PropertyExtender/Updates/create_extras_table.php
<?php namespace Mejlak\Propertyextender\Updates;
use Schema;
use October\Rain\Database\Schema\Blueprint;
use October\Rain\Database\Updates\Migration;
class CreateExtrasTable extends Migration
{
public function up()
{
Schema::create('mejlak_propertyextender_extras', function(Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('title');
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('mejlak_propertyextender_extras');
}
}
这里是 version.yaml
1.0.1:
- 'First version of propertyextender'
- create_extras_table.php
任何帮助将不胜感激
【问题讨论】:
-
您的目录是小写的?例如:
plugins/mejlak/propertyextender/updates/
标签: octobercms