forked from zxbodya/yii2-gallery-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add migration and logic for image extension
- Loading branch information
Steve McKinley
committed
May 15, 2021
1 parent
72f9891
commit 8b45dcc
Showing
3 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
namespace zxbodya\yii2\galleryManager\migrations; | ||
|
||
use yii\db\Schema; | ||
use yii\db\Migration; | ||
|
||
class m210515_022746_add_image_extension extends Migration | ||
{ | ||
public $tableName = '{{%gallery_image}}'; | ||
|
||
public function up() | ||
{ | ||
$this->addColumn($this->tableName, 'extension', Schema::TYPE_STRING); | ||
} | ||
|
||
public function down() | ||
{ | ||
$this->dropColumn($this->tableName, 'extension'); | ||
} | ||
} |