From d163d0287de058cfc13333b78b848117335ec9c8 Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Wed, 11 Dec 2024 17:39:42 +0100 Subject: [PATCH] Rename Table template_instance --- .../m241211_100136_template_instance.php | 25 +++++++++++++++++++ migrations/uninstall.php | 2 +- modules/template/models/TemplateInstance.php | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 migrations/m241211_100136_template_instance.php diff --git a/migrations/m241211_100136_template_instance.php b/migrations/m241211_100136_template_instance.php new file mode 100644 index 00000000..2e800945 --- /dev/null +++ b/migrations/m241211_100136_template_instance.php @@ -0,0 +1,25 @@ +renameTable('custom_pages_template_container', 'custom_pages_template_instance'); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + $this->safeDropTable('custom_pages_template_records_content'); + } +} diff --git a/migrations/uninstall.php b/migrations/uninstall.php index b95d636b..2cb1bee4 100644 --- a/migrations/uninstall.php +++ b/migrations/uninstall.php @@ -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'); diff --git a/modules/template/models/TemplateInstance.php b/modules/template/models/TemplateInstance.php index 0d8e07f9..de355eba 100644 --- a/modules/template/models/TemplateInstance.php +++ b/modules/template/models/TemplateInstance.php @@ -38,7 +38,7 @@ public function behaviors() */ public static function tableName() { - return 'custom_pages_template_container'; + return 'custom_pages_template_instance'; } /**