Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2564

Extension Writers Discussion • Re: ALTER colum tinyint to smallint

$
0
0
Instead of "add_tables" you can use "change_columns" to update the type in a new migration file. Just specify the new array with the same column but the type needed. You can use revert schema in the new migration to go back to the original size if wanted.

Code:

public function update_schema()    {        return [            'change_columns' => [                $this->table_prefix . 'randomquotes' => [                    'randomquotes_id' => ['USINT:4', null, 'auto_increment'],                ],            ],        ];    }
https://area51.phpbb.com/docs/dev/3.2.x ... ge_columns

Statistics: Posted by Anișor — Fri Apr 25, 2025 7:50 am



Viewing all articles
Browse latest Browse all 2564

Trending Articles