Thread

[MySQL] Cannot specify the length on a key

November 12, 2017 7:06am

Subscribe [2]
  • #1 / Nov 12, 2017 7:06am

    Reinos

    74 posts

    Is there a way to specify a key length in ee()->dbforge->add_key(‘key_name’, null, 60); Where 60 is the key length.

    Currently, it looks not available, resulting in a custom query to the database.

  • #2 / Nov 13, 2017 10:39am

    Kevin Cupp's avatar

    Kevin Cupp

    727 posts

    No sorry, looks like DB Forge does not support setting a key length currently.

  • #3 / Nov 13, 2017 1:17pm

    Reinos

    74 posts

    Hi Kevin,

    What is the best way to add it? custom query?

  • #4 / Nov 13, 2017 1:55pm

    Kevin Cupp's avatar

    Kevin Cupp

    727 posts

    Yes that’s currently the best way.

ExpressionEngine News

#eecms, #events, #releases