Skip to content

Commit

Permalink
Fix query unseeding
Browse files Browse the repository at this point in the history
  • Loading branch information
akazorg committed Feb 6, 2018
1 parent 85df4f9 commit c810446
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class BreadTemplatesDataRowsTableUnseeder extends Seeder
public function run()
{
// fetch all rows where JSON not empty
$rows = DataRow::whereNot('details', '');
$rows = DataRow::where('details', '<>', '')->get();


// find every record for existence of Template attributes
// and delete this key.
Expand All @@ -22,7 +23,7 @@ public function run()

// delete key if found
if (isset($details->template)) {
unset($details['template']);
unset($details->template);

$row->details = json_encode($details);

Expand Down

0 comments on commit c810446

Please sign in to comment.