【发布时间】:2023-04-03 20:31:01
【问题描述】:
我正在使用 Laravel 5.7 和 PostgreSQL 构建一个站点。问题是:
是
Schema::table('the_table', function (Blueprint $table) {
$table->index(['column1', 'column2'], 'the_index', 'the_method')
});
相当于
CREATE INDEX the_index ON the_table USING the_method ((ARRAY[column1, column2]));
?
如果没有,有没有办法用 Eloquent 做到这一点?
【问题讨论】:
标签: php sql laravel postgresql eloquent