Skip to content

Commit

Permalink
rename table from 'LinkPreview' to 'link_preview'
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-chepurnoi committed Nov 9, 2016
1 parent b42f71f commit b5c111c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions migrations/m161109_110549_rename_link_preview_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

use app\components\Migration;

class m161109_110549_rename_link_preview_table extends Migration
{
public function up()
{
$this->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()
{
}
*/
}
2 changes: 1 addition & 1 deletion models/LinkPreviewModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class LinkPreviewModel extends ActiveRecord
*/
public static function tableName()
{
return 'LinkPreview';
return '{{%link_preview}}';
}

/**
Expand Down

0 comments on commit b5c111c

Please sign in to comment.