/**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('object_revision');
     Schema::dropIfExists('object');
     Schema::dropIfExists('page_revision');
     Schema::dropIfExists('page');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     $tables = ['attached', 'attaches'];
     foreach ($tables as $table) {
         Schema::dropIfExists($table);
     }
 }
예제 #3
0
파일: Schema.php 프로젝트: jrafaelca/Doptor
 /**
  * Overload the drop method of Schema to prevent the dropping
  * of core CMS tables
  * @param  $table
  * @return
  */
 public static function dropIfExists($table)
 {
     // Drop the table only if it isn't one of the core tables
     if (static::isNotCoreTable($table)) {
         parent::dropIfExists($table);
     }
 }
예제 #4
0
 public function down()
 {
     $tables = $this->tables;
     $tables = array_reverse($tables);
     foreach ($tables as $model) {
         Schema::dropIfExists($model::getTableName());
     }
 }
 /**
  * Rollback the migration.
  */
 public function down()
 {
     if (!$this->hasConnection()) {
         Schema::dropIfExists($this->getTableName());
         return;
     }
     Schema::connection($this->connection)->dropIfExists($this->getTableName());
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('history', function (Blueprint $table) {
         $table->dropForeign('history_type_id_foreign');
         $table->dropForeign('history_user_id_foreign');
     });
     Schema::dropIfExists('history_types');
     Schema::dropIfExists('history');
 }
 protected function process()
 {
     global $wpdb;
     // We need to create references to ms global tables to enable Network.
     foreach ($this->multisiteTables() as $table => $prefixed_table) {
         $this->line('Dropping table: ' . $prefixed_table);
         Schema::dropIfExists($prefixed_table);
     }
     $this->line('Done.');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('attachments');
     // Create & attach new entity permissions
     $ops = ['Create All', 'Create Own', 'Update All', 'Update Own', 'Delete All', 'Delete Own'];
     $entity = 'Attachment';
     foreach ($ops as $op) {
         $permName = strtolower($entity) . '-' . strtolower(str_replace(' ', '-', $op));
         DB::table('role_permissions')->where('name', '=', $permName)->delete();
     }
 }
예제 #9
0
 public function testMetaOperate()
 {
     Schema::dropIfExists('users_meta');
     $mock = ['name' => 'hello', 'email' => '*****@*****.**', 'password' => md5('123456'), 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')];
     $user = $this->operator->reset()->insert($mock);
     // test auto build meta table
     $this->assertFalse(Schema::hasTable('users_meta'), 'expect users_meta not exist, but not');
     $this->operator->meta($user['id'], 'meta.key', $mock);
     $this->assertTrue(Schema::hasTable('users_meta'), 'expect users_meta exist, but not');
     // test find meta
     $value = $this->operator->meta($user['id'], 'meta.key');
     $this->assertEquals($mock, $value);
     // test set multi meta value
     $this->operator->metadata($user['id'], ['age' => 16, 'nick' => 'codelint', 'ext' => ['something...']]);
     $age = $this->operator->meta($user['id'], 'age');
     $this->assertEquals(16, $age);
     $nick = $this->operator->meta($user['id'], 'nick');
     $this->assertEquals('codelint', $nick);
     $metadata = $this->operator->metadata($user['id']);
     $this->assertEquals(['meta.key' => $mock, 'age' => 16, 'nick' => 'codelint', 'ext' => ['something...']], $metadata);
     $this->operator->metadata($user['id'], ['age' => 17, 'nick' => 'ray', 'sex' => '***']);
     $metadata = $this->operator->metadata($user['id']);
     $this->assertEquals(['meta.key' => $mock, 'age' => 17, 'nick' => 'ray', 'sex' => '***', 'ext' => ['something...']], $metadata);
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('comments');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('acl_user_roles');
 }
 public function down()
 {
     Schema::dropIfExists('addresses');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('laravel_sms');
 }
예제 #14
0
 /**
  * Downgrade database.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('jobs');
     Schema::dropIfExists('cache');
     Schema::dropIfExists('sessions');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     foreach ($this->tables as $table) {
         Schema::dropIfExists($table);
     }
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('books');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('customers');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('parcels');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('order_revisions');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('bib_tex');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('events');
     //
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('users');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('acl_groups');
 }
예제 #24
0
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('password_resets');
     Schema::dropIfExists('users');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('forum_tags');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('exam_attendee_question_answer');
     Schema::dropIfExists('exam_attendee_question');
     Schema::dropIfExists('answer');
     Schema::dropIfExists('question');
     Schema::dropIfExists('exam_attendee');
     Schema::dropIfExists('attendee');
     Schema::dropIfExists('exam');
     Schema::dropIfExists('training');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('po_manpower');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('event_venues');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('codelist_group');
     Schema::dropIfExists('codelist_item');
 }
 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::dropIfExists('post_tag');
 }