OFFLINE-GmbH / oc-responsive-images-plugin

Adds reponsive images capabilities to October CMS
MIT License
45 stars 26 forks source link

[FIX] single dropColumn() call #77

Closed matteotrubini closed 3 years ago

matteotrubini commented 3 years ago

[...] You may drop multiple columns from a table by passing an array of column names to the dropColumn method [...]

https://laravel.com/docs/6.x/migrations#dropping-columns

tobias-kuendig commented 3 years ago

Thanks for the PR. Does this actually fix a problem or is this just cosmetic?

matteotrubini commented 3 years ago
$ php artisan plugin:refresh offline.responsiveimages

In Connection.php line 669:

  SQLSTATE[HY000]: General error: 1 no such column: offline_responsiveimages_focus_x_axis (SQL: CREATE TEMPORARY TABLE __temp__system_files AS SELECT id, disk_name, file_name, file_size, content_type, ti  
  tle, description, field, attachment_id, attachment_type, is_public, sort_order, created_at, updated_at, offline_responsiveimages_focus_x_axis FROM system_files)

In Exception.php line 18:

  SQLSTATE[HY000]: General error: 1 no such column: offline_responsiveimages_focus_x_axis

In PDOConnection.php line 79:

  SQLSTATE[HY000]: General error: 1 no such column: offline_responsiveimages_focus_x_axis   

NB: SQLite, not tried on other.

matteotrubini commented 3 years ago

Another ref: https://github.com/laravel/framework/commit/471151a95a161c2736338f9a5d3b6885128d84f0

tobias-kuendig commented 3 years ago

Ah yes, I have stumbled upon this problem before as well. Thank you!