diff --git a/components/Migration.php b/components/Migration.php index 322b8e7..54bcec5 100644 --- a/components/Migration.php +++ b/components/Migration.php @@ -2,6 +2,7 @@ namespace pvsaintpe\db\components; +use yii\db\ColumnSchemaBuilder; use yii\db\TableSchema; use pvsaintpe\boost\db\Migration as BaseMigration; @@ -639,4 +640,34 @@ public function dropColumnForeignKey($table, $column) $this->dropForeignKey($name, $table); } } + + /** + * Creates a medium text column. + * @return ColumnSchemaBuilder the column instance which can be further customized. + * @throws + */ + public function mediumText() + { + return $this->db->getSchema()->createColumnSchemaBuilder('mediumtext'); + } + + /** + * Creates a long text column. + * @return ColumnSchemaBuilder the column instance which can be further customized. + * @throws + */ + public function longText() + { + return $this->db->getSchema()->createColumnSchemaBuilder('longtext'); + } + + /** + * Creates a tiny text column. + * @return ColumnSchemaBuilder the column instance which can be further customized. + * @throws + */ + public function tinyText() + { + return $this->db->getSchema()->createColumnSchemaBuilder('tinytext'); + } }