Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17524

Add possibility to use index key length in migrations

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.0.0-a1
    • None

      In phpBB 3.3.x, it is possible to add index key length in migrations, f.e.

       

      	public function update_schema()
      	{
      		return [
      			'add_index'	=> [
      				$this->table_prefix . 'my_table'		=> [
      					'my_index'	=> ['column1', 'column2(191)'],
      				],
      			]
      		];
      	}
      

      Index length is a mandatory in some cases, f.e. in MySQL for the TEXT data type index, otherwise it will throw MySQL exceptions like "An exception occurred while executing a query: BLOB/TEXT column \'column_name\' used in key specification without a key length".

      Currently specifying index key length in migration won't work in phpBB 4.

            Unassigned Unassigned
            rxu rxu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: