File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 19
19
- Fixed an error that could occur when calling ` craft\webhooks\Plugin::getRequestData() ` if an invalid request ID was passed.
20
20
- Fixed an exception that could occur when retrying webhook requests, if the queue driver didn’t support delayed jobs.
21
21
- Fixed an exception that could occur when sending webhook requests, if Guzzle wasn’t able to connect to the server.
22
+ - Fixed an error during install, if the database tables already existed. ([ #46 ] ( https://github.com/craftcms/webhooks/issues/46 ) )
22
23
23
24
## 2.3.3 - 2021-04-01
24
25
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ class Install extends Migration
17
17
*/
18
18
public function safeUp (): bool
19
19
{
20
+ // Cleanup
21
+ $ this ->_dropTables ();
22
+
20
23
// Create the webhookgroups table
21
24
$ this ->createTable ('{{%webhookgroups}} ' , [
22
25
'id ' => $ this ->primaryKey (),
@@ -84,11 +87,14 @@ public function safeUp(): bool
84
87
*/
85
88
public function safeDown (): bool
86
89
{
87
- // Drop the DB table
90
+ $ this ->_dropTables ();
91
+ return true ;
92
+ }
93
+
94
+ private function _dropTables (): void
95
+ {
88
96
$ this ->dropTableIfExists ('{{%webhookrequests}} ' );
89
97
$ this ->dropTableIfExists ('{{%webhooks}} ' );
90
98
$ this ->dropTableIfExists ('{{%webhookgroups}} ' );
91
-
92
- return true ;
93
99
}
94
100
}
You can’t perform that action at this time.
0 commit comments