diff --git a/migrations/m161109_110549_rename_link_preview_table.php b/migrations/m161109_110549_rename_link_preview_table.php new file mode 100644 index 0000000..b9c3102 --- /dev/null +++ b/migrations/m161109_110549_rename_link_preview_table.php @@ -0,0 +1,27 @@ +renameTable('{{%LinkPreview}}', '{{%link_preview}}'); + } + + public function down() + { + $this->renameTable('{{%link_preview}}', '{{%LinkPreview}}'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/models/LinkPreviewModel.php b/models/LinkPreviewModel.php index 5849190..333d866 100644 --- a/models/LinkPreviewModel.php +++ b/models/LinkPreviewModel.php @@ -26,7 +26,7 @@ class LinkPreviewModel extends ActiveRecord */ public static function tableName() { - return 'LinkPreview'; + return '{{%link_preview}}'; } /**