我正在按照本教程创建一个简单的 OctoberCMS 插件。所以我按顺序执行以下命令:
php artisan create:plugin Acme.Demo
php artisan create:model Acme.Demo Task
php artisan plugin:refresh Acme.Demo
输出:
Rolled back: Acme.Demo
Reinstalling plugin...
Acme.Demo
- v1.0.1: First version of Demo
- v1.0.2: Create the TODO Tasks table
以下是create_task_table.php
更新文件夹中的内容:
<?php namespace Acme\Demo\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class CreateTasksTable extends Migration
{
public function up()
{
Schema::create('acme_demo_tasks', function($table)
{
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('title')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('acme_demo_tasks');
}
}
根据教程,在这一步之后我应该可以看到acme_demo_tasks
数据库中的表,但是我看不到它,而且似乎还没有创建表。有什么我做错了吗?