Skip to content

Commit

Permalink
Merge pull request #19 from humhub/fix/18-add-migrations-uninstall
Browse files Browse the repository at this point in the history
Add migrations uninstall
  • Loading branch information
luke- authored Oct 20, 2023
2 parents 1e07926 + fc54bc8 commit 54c785d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.0.5 (Unreleased)
--------------------------
- Fix #18: Add migrations uninstall

1.0.4 (September 22, 2023)
--------------------------
- Enh #17: Tests for `next` version
Expand Down
24 changes: 24 additions & 0 deletions migrations/uninstall.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* @link https://www.humhub.org/
* @copyright Copyright (c) HumHub GmbH & Co. KG
* @license https://www.humhub.com/licences
*/

use humhub\components\Migration;

class uninstall extends Migration
{
public function up()
{
$this->safeDropTable('question_answer_vote');
$this->safeDropTable('question_answer');
$this->safeDropTable('question');
}

public function down()
{
echo "uninstall does not support migration down.\n";
return false;
}
}
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Q&A",
"description": "Elevate your knowledge sharing experience by enabling users to ask questions and upvote the most helpful answers.",
"keywords": ["Q&A", "questions answers"],
"version": "1.0.4",
"version": "1.0.5",
"humhub": {
"minVersion": "1.14"
},
Expand Down

0 comments on commit 54c785d

Please sign in to comment.