質問編集履歴
1
db情報の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -68,8 +68,98 @@
|
|
68
68
|
|
69
69
|
|
70
70
|
|
71
|
-
|
71
|
+
2019_05_03_000001_create_customer_columnsの内容は以下のようになっています。
|
72
72
|
|
73
73
|
|
74
74
|
|
75
|
+
```ここに言語を入力
|
76
|
+
|
77
|
+
<?php
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
use Illuminate\Database\Migrations\Migration;
|
82
|
+
|
83
|
+
use Illuminate\Database\Schema\Blueprint;
|
84
|
+
|
85
|
+
use Illuminate\Support\Facades\Schema;
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
class CreateCustomerColumns extends Migration
|
90
|
+
|
91
|
+
{
|
92
|
+
|
93
|
+
/**
|
94
|
+
|
95
|
+
* Run the migrations.
|
96
|
+
|
97
|
+
*
|
98
|
+
|
99
|
+
* @return void
|
100
|
+
|
101
|
+
*/
|
102
|
+
|
103
|
+
public function up()
|
104
|
+
|
105
|
+
{
|
106
|
+
|
107
|
+
Schema::table('users', function (Blueprint $table) {
|
108
|
+
|
109
|
+
$table->string('stripe_id')->nullable()->index();
|
110
|
+
|
111
|
+
$table->string('pm_type')->nullable();
|
112
|
+
|
113
|
+
$table->string('pm_last_four', 4)->nullable();
|
114
|
+
|
115
|
+
$table->timestamp('trial_ends_at')->nullable();
|
116
|
+
|
117
|
+
});
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
/**
|
124
|
+
|
125
|
+
* Reverse the migrations.
|
126
|
+
|
127
|
+
*
|
128
|
+
|
129
|
+
* @return void
|
130
|
+
|
131
|
+
*/
|
132
|
+
|
133
|
+
public function down()
|
134
|
+
|
135
|
+
{
|
136
|
+
|
137
|
+
Schema::table('users', function (Blueprint $table) {
|
138
|
+
|
139
|
+
$table->dropColumn([
|
140
|
+
|
141
|
+
'stripe_id',
|
142
|
+
|
143
|
+
'pm_type',
|
144
|
+
|
145
|
+
'pm_last_four',
|
146
|
+
|
147
|
+
'trial_ends_at',
|
148
|
+
|
149
|
+
]);
|
150
|
+
|
151
|
+
});
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
}
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
```
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
ちなみに、ローカル環境ではきちんとmigrateできます。
|
164
|
+
|
75
165
|
このエラーの解決方法をご存知の方がいれば教えていただけないでしょうか。
|