drop column migration laravel
// To drop a column, use the dropColumn method on the schema builder.
// Before dropping columns from a SQLite database, you will need to add
// the doctrine/dbal dependency to your composer.json file and run the
// composer update command in your terminal to install the library:
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('votes');
}); 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');
});
}
}Schema::drop('users');
Schema::dropIfExists('users');
Also in PHP:
- check string for value php
- create new project laravel
- $_Server php
- envoyer mail php depuis localhost
- doctrine query builder order by multiple
- drupal create user
- br php
- convert php timestamp to date
- $s->$h php code
- Backend fatal error: PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted in laravel 8
- count string length php
- codeigniter get insert iditer print last query
- find string into string
- create php laravel project
- dispaly object type php
- NAME OF YOUR FORM in contact form 7
- calculate string length php
- check if array key is empty php
- composer uninstall package
- create user laravel seeder
- create an exception php
- create folder php en linux centos 7
- create laravel project version 5.8
- class 'illuminate support facades input' not found laravel 7