/** * 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('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() { $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('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('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('account_verification_tokens', function ($table) { $table->dropForeign('account_verification_tokens_user_id_foreign'); }); //Drop the table $this->schema->dropIfExists('account_verification_tokens'); }
/** * Handle the event. * * @param AssignmentWasDeleted $event */ public function handle(AssignmentWasDeleted $event) { $assignment = $event->getAssignment(); $fieldType = $assignment->getFieldType(); if (!$fieldType instanceof MultipleFieldType) { return; } $this->schema->dropIfExists($fieldType->getPivotTableName()); }
/** * Handle the event. * * @param AssignmentWasDeleted $event */ public function handle(AssignmentWasDeleted $event) { $assignment = $event->getAssignment(); $fieldType = $assignment->getFieldType(); if (!$fieldType instanceof FilesFieldType) { return; } $this->schema->dropIfExists($table = $assignment->getStreamPrefix() . $assignment->getStreamSlug() . '_' . $fieldType->getField()); }
/** * Install the extensions table. */ public function handle() { $this->schema->dropIfExists('addons_extensions'); $this->schema->create('addons_extensions', function (Blueprint $table) { $table->increments('id'); $table->string('slug'); $table->boolean('installed')->default(0); $table->boolean('enabled')->default(0); }); }
/** * 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('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('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('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('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'); }
/** * Handle the event. * * @param AssignmentWasCreated $event */ public function handle(AssignmentWasCreated $event) { $assignment = $event->getAssignment(); $fieldType = $assignment->getFieldType(); if (!$fieldType instanceof FilesFieldType) { return; } $table = $assignment->getStreamPrefix() . $assignment->getStreamSlug() . '_' . $fieldType->getField(); $this->schema->dropIfExists($table); $this->schema->create($table, function (Blueprint $table) { $table->integer('entry_id'); $table->integer('file_id'); $table->integer('sort_order')->nullable(); $table->primary(['entry_id', 'file_id']); }); }
/** * Destroy the tables. * * @param \Illuminate\Console\Command $command * @return void */ public function down(Command $command) { foreach ($this->tables as $table) { $this->dropping($command, $table); $this->schema->dropIfExists($table); $this->done($command); } }
/** * Handle the event. * * @param AssignmentWasCreated $event */ public function handle(AssignmentWasCreated $event) { $assignment = $event->getAssignment(); $fieldType = $assignment->getFieldType(); if (!$fieldType instanceof MultipleFieldType) { return; } $table = array_get($fieldType->getConfig(), 'pivot_table', $assignment->getStreamPrefix() . $assignment->getStreamSlug() . '_' . $fieldType->getField()); $foreignKey = $fieldType->getForeignKey(); $otherKey = $fieldType->getOtherKey(); $this->schema->dropIfExists($table); $this->schema->create($table, function (Blueprint $table) use($foreignKey, $otherKey) { $table->increments('id'); $table->integer($foreignKey); $table->integer($otherKey); }); }
/** * Drop a table from the schema if it exists. * * @param string $table * @return \Illuminate\Database\Schema\Blueprint * @static */ public static function dropIfExists($table) { return \Illuminate\Database\Schema\Builder::dropIfExists($table); }
public function downTable(Builder $builder) { $builder->dropIfExists($this->table); }
/** * Undo the migration */ public function down() { //Drop table $this->schema->dropIfExists('account_status'); }
/** * Undo the migration */ public function down() { //Drop table $this->schema->dropIfExists('ci_sessions'); }
/** * Undo the migration */ public function down() { //Drop table $this->schema->dropIfExists('contents'); }
/** * Undo the migration */ public function down() { //Drop table $this->schema->dropIfExists('contact_messages'); }
public function drop($table) { $this->builder->dropIfExists($table); }
/** * Drop a table. * * @param $table */ public function dropTable($table) { $this->schema->dropIfExists($table); }
/** * Undo the migration */ public function down() { //Drop the table $this->schema->dropIfExists('uom_valid_ids'); }
/** * Indicate that the table should be dropped if it exists. * * @return \Illuminate\Support\Fluent */ public function dropIfExists($table) { $this->helper->dropAutoIncrementObjects($table); parent::dropIfExists($table); }
/** * Drop a table from the schema if it exists. * * @param string $table * * @return \Illuminate\Database\Schema\Blueprint */ public static function dropIfExists($table) { static::$instance = static::$instance ?: new static(); return static::$schema->dropIfExists($table); }