Advertisement
Guest User

Untitled

a guest
Feb 29th, 2016
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.24 KB | None | 0 0
  1. <?php
  2.  
  3. use Phalcon\Db\Column;
  4. use Phalcon\Db\Index;
  5. use Phalcon\Db\Reference;
  6. use Phalcon\Mvc\Model\Migration;
  7.  
  8. /**
  9.  * Class TestMigration_1000005000
  10.  */
  11. class TestMigration_1000005000 extends Migration
  12. {
  13.     /**
  14.      * Define the table structure
  15.      *
  16.      * @return void
  17.      */
  18.     public function morph()
  19.     {
  20.         $this->morphTable('test', array(
  21.                 'columns' => array(
  22.                     new Column(
  23.                         'test',
  24.                         array(
  25.                             'type' => Column::TYPE_INTEGER,
  26.                             'first' => true
  27.                         )
  28.                     ),
  29.                     new Column(
  30.                         'testcolumn',
  31.                         array(
  32.                             'type' => Column::TYPE_CHAR,
  33.                             'size' => 1,
  34.                             'after' => 'test'
  35.                         )
  36.                     )
  37.                 ),
  38.             )
  39.         );
  40.     }
  41.  
  42.     /**
  43.      * Run the migrations
  44.      *
  45.      * @return void
  46.      */
  47.     public function up()
  48.     {
  49.  
  50.     }
  51.  
  52.     /**
  53.      * Reverse the migrations
  54.      *
  55.      * @return void
  56.      */
  57.     public function down()
  58.     {
  59.  
  60.     }
  61.  
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement