I am getting the following error when running migrations. The error in my terminal console is: 

```
SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'referral_code' used in key specification without a key length (SQL: alter table `users` add index `users_referral_code_index`(`referral_code`))

```

---

Below is my actual migration file. I can't see to tell why it's happening, as I've used this pattern before with other migrations. 

```
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddReferralInfoToUsersTable extends Migration
{
    public function up()
    {
        Schema::table('shop_users', function (Blueprint $table) {
            $table->text('referral_code')->nullable();
            $table->integer('referral_uses')->nullable();
            $table->integer('referral_revenue')->nullable();
            $table->index(['referral_code']);
        });
    }
}

```