Search
 
SCRIPT & CODE EXAMPLE
 

PHP

drop column migration laravel

 Class RemoveCommentViewCount extends Migration
  {
      public function up()
      {
          Schema::table('articles', function($table) {
             $table->dropColumn('comment_count');
             $table->dropColumn('view_count');
          });
      }

      public function down()
      {
          Schema::table('articles', function($table) {
             $table->integer('comment_count');
             $table->integer('view_count');
          });
      }
  }
Comment

drop column table in migration if exist in laravel

Schema::table('users', function (Blueprint $table) {
     if (Schema::hasColumn('users', 'phone')) {
              $table->dropColumn('phone');
		}
});
Comment

drop column laravel migration

Schema::table('clients', function (Blueprint $table) {
    $table->string('UserDomainName');
});
Comment

PREVIOUS NEXT
Code Example
Php :: Proc file for laravel 
Php :: show image laravel 
Php :: Laravel stop on first validation error 
Php :: get server ip php 
Php :: in_array validation laravel 
Php :: laravel loop index 
Php :: email or phone required in laravel 
Php :: magento 2 db connection 
Php :: replace text in string php 
Php :: php array to array collection 
Php :: laravel pagination problem in blade 
Php :: get min value from array php 
Php :: new session php 
Php :: how to solve php mysqli_query function problem does not execute 
Php :: admin-ajax.php 400 (bad request) 
Php :: array php 
Php :: laravel custom validation message 
Php :: how to return chunk data laravel 
Php :: how to read sqlite file in php 
Php :: contact form 7 checkbox2 
Php :: doctrine querybuilder print sql 
Php :: laravel Please provide a valid cache path 
Php :: laravel select raw where 
Php :: php super 
Php :: Laravel 8 Pagination Ui Problem 
Php :: wp add menu page and subpage 
Php :: blank admin page magento 2.3 
Php :: rawbetween in laravel 
Php :: setcookie in php 
Php :: php laravel dump 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =