leomarquine / php-etl

Extract, Transform and Load data using PHP.
MIT License
178 stars 81 forks source link

Soft delete need the rest of the object to update #2

Closed dandelionmood closed 6 years ago

dandelionmood commented 7 years ago

Hi !

Thanks for your work, it's proven quite useful to me ! I just noticed a little bug in the way the soft delete is written, here's my quick and dirty fix !

Pierre

leomarquine commented 7 years ago

But why are you passing all the items to the query? When soft deleting the only column you should update is the deleted_at column with the current time.

dandelionmood commented 7 years ago

You're right, and that wasn't working either. I updated the patch accordingly :) !

leomarquine commented 7 years ago

@dandelionmood any news on that?

dandelionmood commented 7 years ago

hi @leomarquine the branch « branch-1 » should be OK !

leomarquine commented 7 years ago

So we really need this? If you don't set the column it will be bull anyway. Do you have any errors without it?

if( $this->delete === 'soft' ) {
    $item['deleted_at'] = null;
}
leomarquine commented 7 years ago

@dandelionmood ?

dandelionmood commented 7 years ago

Sorry, I didn't have time to check it yet.

Pierre