A Andy R Member Sep 10, 2024 #1 How do I tell the schemaManager to create an index along with a new column? Example? PHP: $this->schemaManager()->createTable('some_table', function(Create $table) { $table->addColumn('some_id', 'int'); });
How do I tell the schemaManager to create an index along with a new column? Example? PHP: $this->schemaManager()->createTable('some_table', function(Create $table) { $table->addColumn('some_id', 'int'); });
A Andy R Member Sep 10, 2024 #2 GPT gave me the answer: Code: $table->addKey(['user_id', 'some_id'], 'index_user_whatever');