hasTable('betterphotos')) { $table = $schema->createTable('betterphotos'); $table->addColumn('id', 'integer', [ 'autoincrement' => true, 'notnull' => true, ]); $table->addColumn('user_id', 'string', [ 'notnull' => true, 'length' => 200, ]); $table->addColumn('date_taken', Types::INTEGER, [ 'notnull' => false, ]); $table->addColumn('file_id', Types::BIGINT, [ 'notnull' => true, 'length' => 20, ]); $table->setPrimaryKey(['id']); $table->addIndex(['user_id'], 'betterphotos_user_id_index'); } return $schema; } }