@@ -67,7 +67,7 @@ public function createOrUpdateIndex()
67
67
protected function createIndex ()
68
68
{
69
69
$ indexName = $ this ->modelService ->indexName ;
70
- $ tableName = $ this ->modelService ->tableName ;
70
+ $ tableName = $ this ->modelService ->tablePrefixedName ;
71
71
$ indexFields = implode (', ' , array_map (function ($ indexField ) {
72
72
return "` $ indexField` " ;
73
73
}, $ this ->modelService ->getFullTextIndexFields ()));
@@ -84,7 +84,7 @@ protected function createIndex()
84
84
85
85
protected function indexAlreadyExists ()
86
86
{
87
- $ tableName = $ this ->modelService ->tableName ;
87
+ $ tableName = $ this ->modelService ->tablePrefixedName ;
88
88
$ indexName = $ this ->modelService ->indexName ;
89
89
90
90
return !empty (DB ::connection ($ this ->modelService ->connectionName )->
@@ -102,7 +102,7 @@ protected function indexNeedsUpdate()
102
102
protected function getIndexFields ()
103
103
{
104
104
$ indexName = $ this ->modelService ->indexName ;
105
- $ tableName = $ this ->modelService ->tableName ;
105
+ $ tableName = $ this ->modelService ->tablePrefixedName ;
106
106
107
107
$ index = DB ::connection ($ this ->modelService ->connectionName )->
108
108
select ("SHOW INDEX FROM $ tableName WHERE Key_name = ? " , [$ indexName ]);
@@ -131,7 +131,7 @@ protected function updateIndex()
131
131
public function dropIndex ()
132
132
{
133
133
$ indexName = $ this ->modelService ->indexName ;
134
- $ tableName = $ this ->modelService ->tableName ;
134
+ $ tableName = $ this ->modelService ->tablePrefixedName ;
135
135
136
136
if ($ this ->indexAlreadyExists ()) {
137
137
DB ::connection ($ this ->modelService ->connectionName )
0 commit comments