laravel/laravel — Issue #262: (Schema) Cannot name column indexes
Author: sparksp
Created: 2012-01-21 15:11:47+00:00
State: open

The following fails because SQLite requires indexes to be named (see #261), however we cannot add a name here because Schema is checking for `unique === true` (i.e., no value).

```php
create();
$table->increments('id');
$table->text('email')->unique();
});
```

Additionally, there's a subtle difference in SQLite between adding a unique index and adding a unique column constraint to the table. With the above code example I would expect to see the following create table:

```sql
CREATE TABLE "users" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"email" VARCHAR NOT NULL UNIQUE
);
```

Instead of a unique index being added to the table after.