parent
1e8ac74b4e
commit
efcc7b7b5a
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class NewUpdateTableUsers extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->date('marriage_date')->nullable();
|
||||
$table->string('company_type', 50)->nullable();
|
||||
$table->enum('sex', ['male','female'])->nullable();
|
||||
$table->string('registration_number',50)->nullable();
|
||||
$table->string('economic_code', 50)->nullable();
|
||||
$table->timestamp('modified_at')->nullable()->default('CURRENT_TIMESTAMP');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('marriage_date');
|
||||
$table->dropColumn('company_type');
|
||||
$table->dropColumn('sex');
|
||||
$table->dropColumn('registration_number');
|
||||
$table->dropColumn('economic_code');
|
||||
});
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue