Skip to content

Commit

Permalink
Merge pull request #5 from pvsaintpe/fix-procedure
Browse files Browse the repository at this point in the history
add to migration
  • Loading branch information
pvsaintpe committed Mar 19, 2019
2 parents 5ce0ca7 + 64ad505 commit 2349e9c
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions components/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace pvsaintpe\db\components;

use yii\db\ColumnSchemaBuilder;
use yii\db\TableSchema;
use pvsaintpe\boost\db\Migration as BaseMigration;

Expand Down Expand Up @@ -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');
}
}

0 comments on commit 2349e9c

Please sign in to comment.