Skip to content

Commit

Permalink
Revert "issue 22"
Browse files Browse the repository at this point in the history
This reverts commit b5d78df.
  • Loading branch information
willpower232 committed Jul 21, 2023
1 parent 434972e commit 0623864
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Migrator/Pipes/CreateNewMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected function fillSettings(Metadata $metadata, Collection $models): int
->select([
DB::raw("'{$metadata->getKey()}' as metadata_id"),
DB::raw("{$model->getKeyName()} as settable_id"),
DB::raw("'". str_replace("\\\\", "\\", addcslashes($model->getMorphClass(), '\\'))."' as settable_type"),
DB::raw("'" . addcslashes($model->getMorphClass(), '\\') . "' as settable_type"),
DB::raw("'{$metadata->getRawOriginal('default', 'NULL')}' as value"),
DB::raw("'{$this->now->toDateTimeString()}' as created_at"),
DB::raw("'{$this->now->toDateTimeString()}' as updated_at"),
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Commands/MigrateCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public function test_creates_new_setting(): void
$this->assertDatabaseHas('user_settings', [
'id' => 1,
'metadata_id' => 1,
'settable_type' => DummyModel::class,
'settable_type' => addcslashes(DummyModel::class, '\\'), // orchestras database substitute is weird
'settable_id' => 1,
'value' => '',
'is_enabled' => true,
Expand Down

0 comments on commit 0623864

Please sign in to comment.