File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
src/Filament/Integration/Migrations Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 1818use Relaticle \CustomFields \FeatureSystem \FeatureManager ;
1919use Relaticle \CustomFields \Models \CustomField ;
2020use Throwable ;
21- use Relaticle \CustomFields \Models \Scopes \CustomFieldsActivableScope ;
22- use Relaticle \CustomFields \Services \TenantContextService ;
2321
2422class CustomFieldsMigrator implements CustomsFieldsMigrators
2523{
@@ -32,21 +30,15 @@ class CustomFieldsMigrator implements CustomsFieldsMigrators
3230 public function setTenantId (int |string |null $ tenantId = null ): void
3331 {
3432 $ this ->tenantId = $ tenantId ;
35-
36- TenantContextService::setTenantId ($ this ->tenantId );
3733 }
3834
3935 public function find (string $ model , string $ code ): CustomFieldsMigrator
4036 {
4137 $ this ->customField = CustomFields::newCustomFieldModel ()
4238 ->query ()
43- ->withoutGlobalScope (CustomFieldsActivableScope::class)
4439 ->forMorphEntity ((Entities::getEntity ($ model )?->getAlias()) ?? $ model )
4540 ->where ('code ' , $ code )
46- ->firstOrFail ()
47- ;
48-
49- $ this ->customField ->load ('section ' );
41+ ->firstOrFail ();
5042
5143 $ this ->customFieldData = CustomFieldData::from ($ this ->customField );
5244
@@ -191,9 +183,6 @@ public function update(array $data): void
191183 $ updateData [config ('custom-fields.database.column_names.tenant_foreign_key ' )] = $ this ->tenantId ;
192184 }
193185
194- unset($ updateData ['section ' ]);
195- unset($ updateData ['options ' ]);
196-
197186 $ this ->customField ->update ($ updateData );
198187
199188 if (
You can’t perform that action at this time.
0 commit comments