/**
  * Undo the migration
  */
 public function down()
 {
     //Remove Field
     $this->schema->table('user_details', function ($table) {
         $table->dropColumn('profile_picture');
     });
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     //Remove url column
     $this->schema->table('notifications', function ($table) {
         $table->dropColumn('url');
     });
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     $this->schema->table('users_basic_info', function ($table) {
         $table->dropForeign('users_basic_info_user_id_foreign');
     });
     //Drop table
     $this->schema->dropIfExists('users_basic_info');
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign
     $this->schema->table('likes', function ($table) {
         $table->dropForeign('likes_user_id_foreign');
     });
     $this->schema->dropIfExists('likes');
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     $this->schema->table('user_works', function ($table) {
         $table->dropForeign('user_works_user_id_foreign');
     });
     //Drop table
     $this->schema->dropIfExists('user_works');
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign
     $this->schema->table('account_verification_tokens', function ($table) {
         $table->dropForeign('account_verification_tokens_user_id_foreign');
     });
     //Drop the table
     $this->schema->dropIfExists('account_verification_tokens');
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign keys
     $this->schema->table('passwords', function ($table) {
         $table->dropForeign('passwords_user_id_foreign');
     });
     //Drop passwords table
     $this->schema->dropIfExists('passwords');
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign
     $this->schema->table('user_details', function ($table) {
         $table->dropForeign('user_details_user_id_foreign');
     });
     //Drop user details table
     $this->schema->dropIfExists('user_details');
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign keys
     $this->schema->table('friend_requests', function ($table) {
         $table->dropForeign('friend_requests_sender_foreign');
         $table->dropForeign('friend_requests_receiver_foreign');
     });
     //Drop table
     $this->schema->dropIfExists('friend_requests');
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign keys
     $this->schema->table('users', function ($table) {
         $table->dropForeign('users_uom_id_foreign');
         $table->dropForeign('users_account_status_foreign');
     });
     //Drop the table
     $this->schema->dropIfExists('users');
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign keys
     $this->schema->table('notifications', function ($table) {
         $table->dropForeign('notifications_receiver_foreign');
         $table->dropForeign('notifications_notifier_foreign');
     });
     //Drop notifications table
     $this->schema->dropIfExists('notifications');
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign keys
     $this->schema->table('friends', function ($table) {
         $table->dropForeign('friends_user_id_1_foreign');
         $table->dropForeign('friends_user_id_2_foreign');
     });
     //Drop table
     $this->schema->dropIfExists('friends');
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign keys
     $this->schema->table('lecturers_courses_faculties', function ($table) {
         $table->dropForeign('lecturer_courses_faculties_uom_id_foreign');
         $table->dropForeign('lecturer_courses_faculties_faculty_id_foreign');
         $table->dropForeign('lecturer_courses_faculties_course_id_foreign');
     });
     //Drop table
     $this->schema->dropIfExists('lecturers_courses_faculties');
 }
 /**
  * Drop a column.
  *
  * @param           $table
  * @param FieldType $type
  */
 public function dropColumn($table, FieldType $type)
 {
     $schema = $type->getSchema();
     if (!$this->schema->hasTable($table)) {
         return;
     }
     $this->schema->table($table, function (Blueprint $table) use($schema) {
         $schema->dropColumn($table);
     });
 }
Esempio n. 15
0
 /**
  * Create table if not exist.
  * @param string table
  * @param \Closure $callback
  */
 public function table($table, \Closure $callback)
 {
     try {
         parent::create($table, $callback);
     } catch (\Exception $e) {
         try {
             parent::table($table, $callback);
         } catch (\Exception $e) {
             echo $e->getMessage();
         }
     }
 }
Esempio n. 16
0
 /**
  * Modify a table on the schema.
  *
  * @param  string   $table
  * @param  \Closure $callback
  *
  * @return \Illuminate\Database\Schema\Blueprint
  */
 public static function table($table, Closure $callback)
 {
     static::$instance = static::$instance ?: new static();
     return static::$schema->table($table, $callback);
 }
Esempio n. 17
0
 public function up()
 {
     $this->schema->table($this->table, function ($table) {
         $this->create($table);
     });
 }
 /**
  * Modify a table on the schema.
  *
  * @param string $table
  * @param \Closure $callback
  * @return \Illuminate\Database\Schema\Blueprint 
  * @static 
  */
 public static function table($table, $callback)
 {
     return \Illuminate\Database\Schema\Builder::table($table, $callback);
 }
 /**
  * Undo the migration
  */
 public function down()
 {
     $this->schema->table('ci_sessions', function ($table) {
         $table->dropPrimary('ci_sessions_session_id_primary');
     });
 }