| 1 | <?php |
||
| 7 | class CreateOauthRefreshTokensTable extends Migration |
||
|
|
|||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Run the migrations. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | 16 | Schema::create('oauth2_refresh_tokens', function(Blueprint $table) { |
|
| 17 | 16 | $table->char('id', 80)->primary(); |
|
| 18 | 16 | $table->char('access_token_id', 80); |
|
| 19 | |||
| 20 | 16 | $table->foreign('access_token_id') |
|
| 21 | 16 | ->references('id')->on('oauth2_access_tokens') |
|
| 22 | 16 | ->onUpdate('cascade') |
|
| 23 | 16 | ->onDelete('cascade'); |
|
| 24 | |||
| 25 | 16 | $table->dateTime('expires_at'); |
|
| 26 | 16 | $table->timestamps(); |
|
| 27 | 16 | }); |
|
| 28 | 16 | } |
|
| 29 | |||
| 30 | /** |
||
| 31 | * Reverse the migrations. |
||
| 32 | * |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | 16 | public function down() |
|
| 36 | { |
||
| 37 | 16 | Schema::drop('oauth2_refresh_tokens'); |
|
| 38 | 16 | } |
|
| 39 | } |
||
| 40 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.