Skip to content

Commit

Permalink
Rename Table template_instance
Browse files Browse the repository at this point in the history
  • Loading branch information
luke- committed Dec 11, 2024
1 parent d5aa616 commit d163d02
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
25 changes: 25 additions & 0 deletions migrations/m241211_100136_template_instance.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

use humhub\components\Migration;

/**
* Class m241203_100135_records_content
*/
class m241211_100136_template_instance extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->renameTable('custom_pages_template_container', 'custom_pages_template_instance');
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->safeDropTable('custom_pages_template_records_content');
}
}
2 changes: 1 addition & 1 deletion migrations/uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$this->safeDropTable('custom_pages_template_file_download_content');
$this->safeDropTable('custom_pages_template_element');
$this->safeDropTable('custom_pages_template_owner_content');
$this->safeDropTable('custom_pages_template_container');
$this->safeDropTable('custom_pages_template_instance');
$this->safeDropTable('custom_pages_template_container_content_definition');
$this->safeDropTable('custom_pages_template_image_content_definition');
$this->safeDropTable('custom_pages_template');
Expand Down
2 changes: 1 addition & 1 deletion modules/template/models/TemplateInstance.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function behaviors()
*/
public static function tableName()
{
return 'custom_pages_template_container';
return 'custom_pages_template_instance';
}

/**
Expand Down

0 comments on commit d163d02

Please sign in to comment.