# Database Migration Error: Specified key was too long

**URL:** <https://drone.discourse.group/t/database-migration-error-specified-key-was-too-long/9606>\
**Category:** Drone Support\
**Created:** [September 28, 2018, 6:26am UTC](https://drone.discourse.group/t/database-migration-error-specified-key-was-too-long/9606 "2018-09-28T06:26:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veitor](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/veitor/32/5077_2.png) [@Veitor](https://drone.discourse.group/u/Veitor)\
**Post date:** [September 28, 2018, 6:26am UTC](https://drone.discourse.group/t/database-migration-error-specified-key-was-too-long/9606/1 "2018-09-28T06:26:05Z")

</div>

I run drone through Docker but failed.

```yaml
drone-server:
    image: drone/drone
    container_name: drone-serer
    environment:
      - DRONE_DATABASE_DRIVER=mysql
      - DRONE_DATABASE_DATASOURCE=root:password@tcp(192.168.0.1:3306)/drone?parseTime=true

```

The error message is `Error 1071: Specified key was too long; max key length is 767 bytes`.

Then I found [sql of `builds` table](https://github.com/drone/drone/blob/master/store/datastore/ddl/mysql/files/003_create_table_builds.sql) has problem, the field Index is too long?

```sql
CREATE INDEX ix_build_author ON builds (build_author);

```

follow is my mysql situation

![image](https://canada1.discourse-cdn.com/flex003/uploads/testdrone/original/2X/1/1445ad97739be592662fa7648c2977428b868043.png)

We should not update mysql configuration items, such as `innodb_large_prefix`,`innodb_file_format` etc. Sql statement should be updated to be correct.

Now I can not do anything except using sqlite.
