Skip to content

Commit 0c292a3

Browse files
committed
migrated TableDiff:$name to TableDiff::getOldTable()->getName()
1 parent 89fec93 commit 0c292a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/RowLevelSecurityAwareComparator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function compareSchemas(Schema $fromSchema, Schema $toSchema): RowLevelSe
3333
}
3434
$tableDiff = $this->compareTable($fromTable, $toTable);
3535
if ($tableDiff instanceof RowLevelSecurityAwareTableDiff) {
36-
$baseDiff->changedTables[$tableDiff->getOldTable()] = $tableDiff;
36+
$baseDiff->changedTables[$tableDiff->getOldTable()->getName()] = $tableDiff;
3737
$hasRlsDiff = true;
3838
}
3939
}

src/RowLevelSecurityAwareTableDiff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function __construct(
1515
TableDiff $baseDiff,
1616
) {
1717
parent::__construct(
18-
$baseDiff->name,
18+
$baseDiff->getOldTable()->getName(),
1919
$baseDiff->addedColumns,
2020
$baseDiff->changedColumns,
2121
$baseDiff->removedColumns,
@@ -37,15 +37,15 @@ public function getRowLevelSecuritySqls(): array
3737
$using = $this->addedRowLevelSecurity['using'] ?? '## TODO 手動設定要 ##';
3838
return $sqlFactory->createEnableSqls(
3939
$this->addedRowLevelSecurity['name'],
40-
$this->name,
40+
$this->getOldTable()->getName(),
4141
$this->addedRowLevelSecurity['role'],
4242
$using,
4343
);
4444
}
4545
if ($this->removedRowLevelSecurity !== null) {
4646
return $sqlFactory->createDisableSqls(
4747
$this->removedRowLevelSecurity['name'],
48-
$this->name,
48+
$this->getOldTable()->getName(),
4949
);
5050
}
5151

0 commit comments

Comments
 (0)