daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Oct 21st, 2018 74 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. <?php
  2.  
  3. namespace Fuel\Migrations;
  4.  
  5. class Create_status
  6. {
  7.     public function up()
  8.     {
  9.         \DBUtil::create_table('status', array(
  10.             'id' => array('constraint' => 11, 'type' => 'int', 'auto_increment' => true),
  11.             'user_id' => array('constraint' => 11, 'type' => 'int'),
  12.             'body' => array('constraint' => 255, 'type' => 'varchar', 'null' => true),
  13.             'created_at' => array('constraint' => 11, 'type' => 'int'),
  14.             'updated_at' => array('constraint' => 11, 'type' => 'int'),
  15.         ), array('id'));
  16.  
  17.         \DBUtil::create_index('status','user_id','user_id_index');
  18.     }
  19.  
  20.     public function down()
  21.     {
  22.         \DBUtil::drop_table('status');
  23.         \DBUtil::drop_index('status','user_id');
  24.     }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top