質問編集履歴
1
ソースコードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -85,7 +85,47 @@
|
|
85
85
|
}
|
86
86
|
|
87
87
|
```
|
88
|
+
2020_06_18_120744_create-table.php
|
89
|
+
```php
|
90
|
+
<?php
|
88
91
|
|
92
|
+
use Illuminate\Support\Facades\Schema;
|
93
|
+
use Illuminate\Database\Schema\Blueprint;
|
94
|
+
use Illuminate\Database\Migrations\Migration;
|
95
|
+
|
96
|
+
class CreateTable extends Migration
|
97
|
+
{
|
98
|
+
/**
|
99
|
+
* Run the migrations.
|
100
|
+
*
|
101
|
+
* @return void
|
102
|
+
*/
|
103
|
+
public function up()
|
104
|
+
{
|
105
|
+
//
|
106
|
+
Schema::create('user', function (Blueprint $table) {
|
107
|
+
$table->increments('id');
|
108
|
+
$table->string('name')->nullable();
|
109
|
+
$table->string('comment')->nullable();
|
110
|
+
$table->string('github_id');
|
111
|
+
$table->timestamps();
|
112
|
+
});
|
113
|
+
}
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Reverse the migrations.
|
117
|
+
*
|
118
|
+
* @return void
|
119
|
+
*/
|
120
|
+
public function down()
|
121
|
+
{
|
122
|
+
//
|
123
|
+
Schema::drop('user');
|
124
|
+
}
|
125
|
+
}
|
126
|
+
```
|
127
|
+
|
128
|
+
|
89
129
|
### 試したこと
|
90
130
|
updated_atに2020/6/20/ 00:00を直接代入
|
91
131
|
|