Skip to content

Commit 5a50a65

Browse files
author
Kurt Friars
committed
Merge branch 'main' into 10.x
2 parents 8ed046e + 77225b0 commit 5a50a65

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

src/Concerns/ListensToSchemaEvents.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44

55
use Closure;
66
use Illuminate\Database\Connection;
7-
use Illuminate\Database\Schema\Builder;
87
use Illuminate\Support\Collection;
98
use Plank\LaravelSchemaEvents\Events\TableChanged;
109
use Plank\LaravelSchemaEvents\Events\TableCreated;
1110
use Plank\LaravelSchemaEvents\Events\TableDropped;
1211
use Plank\LaravelSchemaEvents\Events\TableRenamed;
1312

1413
/**
15-
* @mixin Builder
14+
* @mixin \Illuminate\Database\Schema\Builder
1615
*/
1716
trait ListensToSchemaEvents
1817
{

src/Events/TableChanged.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static function from(Connection $connection, Blueprint $blueprint): self
4444
connection: $connection->getName(),
4545
databaseName: $connection->getDatabaseName(),
4646
driverName: $connection->getDriverName(),
47-
table: $blueprint->getTable(),
47+
table: $connection->getTablePrefix().$blueprint->getTable(),
4848
addedColumns: self::parseAddedColumns($blueprint),
4949
droppedColumns: self::parseDroppedColumns($blueprint),
5050
renamedColumns: self::parseRenamedColumns($blueprint),

src/Events/TableCreated.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static function from(Connection $connection, Blueprint $blueprint): self
3232
connection: $connection->getName(),
3333
databaseName: $connection->getDatabaseName(),
3434
driverName: $connection->getDriverName(),
35-
table: $blueprint->getTable(),
35+
table: $connection->getTablePrefix().$blueprint->getTable(),
3636
columns: self::parseAddedColumns($blueprint),
3737
indexes: self::parseAddedIndexes($blueprint),
3838
foreignKeys: self::parseAddedForeignKeys($blueprint),

src/Events/TableDropped.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static function from(Connection $connection, string $table)
1919
connection: $connection->getName(),
2020
databaseName: $connection->getDatabaseName(),
2121
driverName: $connection->getDriverName(),
22-
table: $table,
22+
table: $connection->getTablePrefix().$table,
2323
);
2424
}
2525
}

src/Events/TableRenamed.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public static function from(Connection $connection, string $from, string $to)
2020
connection: $connection->getName(),
2121
databaseName: $connection->getDatabaseName(),
2222
driverName: $connection->getDriverName(),
23-
from: $from,
24-
to: $to,
23+
from: $connection->getTablePrefix().$from,
24+
to: $connection->getTablePrefix().$to,
2525
);
2626
}
2727
}

0 commit comments

Comments
 (0)