How to add column with foreign key within migration? |
Yes, you need to use query() method now.
The feature to add keys to existing tables will be implemented in v4.3.0. See https://github.com/codeigniter4/CodeIgni....rst#forge PHP Code: $this->forge->addKey(['category', 'name'], false, false, 'category_name'); |
Messages In This Thread |
How to add column with foreign key within migration? - by jozefrebjak - 11-03-2022, 02:18 AM
RE: How to add column with foreign key within migration? - by InsiteFX - 11-04-2022, 12:37 AM
RE: How to add column with foreign key within migration? - by jozefrebjak - 11-20-2022, 12:08 AM
RE: How to add column with foreign key within migration? - by kenjis - 11-20-2022, 04:25 AM
|