table('article_leave_message', ['engine' => 'MyISAM', 'comment' => '文章留言表']); $table->addColumn('article_id', 'integer', ['signed' => false, 'null' => false, 'comment' => '文章ID']) ->addColumn('name', 'string', ['limit' => 64, 'null' => false, 'comment' => '姓名']) ->addColumn('email', 'string', ['limit' => 128, 'null' => false, 'comment' => '邮箱']) ->addColumn('content', 'text', ['null' => false, 'comment' => '内容']) ->addColumn('ip', 'string', ['limit' => 64, 'null' => false, 'comment' => 'IP']) ->addColumn('user_agent', 'string', ['limit' => 255, 'null' => false, 'comment' => 'UserAgent']) ->addColumn('is_audited', 'boolean', ['null' => false, 'default' => 0, 'comment' => '0待审核,1已审核']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->create(); } }