daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Oct 21st, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. namespace Fuel\Migrations;
  4.  
  5. class Add_foreignkey_following
  6. {
  7.     public function up()
  8.     {
  9.         \DBUtil::add_foreign_key('following', array(
  10.             'key' => 'user_id',
  11.             'reference' => array(
  12.                 'table' => 'user',
  13.                 'column' => 'id',
  14.             )
  15.         ));
  16.         \DBUtil::add_foreign_key('following', array(
  17.             'key' => 'following_id',
  18.             'reference' => array(
  19.                 'table' => 'user',
  20.                 'column' => 'id',
  21.             )
  22.         ));
  23.     }
  24.  
  25.     public function down()
  26.     {
  27.         \DBUtil::foreign_key('following','user_id');
  28.         \DBUtil::foreign_key('following','following_id');
  29.     }
  30. }
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