File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 17
17
'storageLimit ' => 500000 ,
18
18
'paginate ' => (int ) env ('FILES_PAGINATION ' , 50 ),
19
19
'testingFolder ' => 'testing ' ,
20
- 'onDeleteSetNull ' => ['avatars ' , 'webshop_brands ' ],
21
20
'renameFolders ' => [
22
21
'dataImport ' => 'import ' ,
23
22
'dataExport ' => 'export ' ,
Original file line number Diff line number Diff line change @@ -46,14 +46,11 @@ private function addForeignKey(string $model): self
46
46
{
47
47
$ table = $ this ->table ($ model );
48
48
$ after = $ this ->afterColumn ($ table );
49
- $ onDelete = in_array ($ table , Config::get ('enso.files.onDeleteSetNull ' ))
50
- ? 'SET NULL '
51
- : 'restrict ' ;
52
49
53
- Schema::table ($ table , function (Blueprint $ table ) use ($ after, $ onDelete ) {
50
+ Schema::table ($ table , function (Blueprint $ table ) use ($ after ) {
54
51
$ table ->unsignedBigInteger ('file_id ' )->nullable ()->after ($ after );
55
52
$ table ->foreign ('file_id ' )->references ('id ' )->on ('files ' )
56
- ->onUpdate ('restrict ' )->onDelete ($ onDelete );
53
+ ->onUpdate ('restrict ' )->onDelete (' restrict ' );
57
54
});
58
55
59
56
return $ this ;
You can’t perform that action at this time.
0 commit comments