hasTable('upschooling')) { $table = $schema->createTable('upschooling'); $table->addColumn('id', 'integer', [ 'autoincrement' => true, 'notnull' => true, ]); $table->addColumn('title', 'string', [ 'notnull' => true, 'length' => 200 ]); $table->addColumn('user_id', 'string', [ 'notnull' => true, 'length' => 200, ]); $table->addColumn('content', 'text', [ 'notnull' => true, 'default' => '' ]); $table->setPrimaryKey(['id']); $table->addIndex(['user_id'], 'upschooling_user_id_index'); } return $schema; } }