2023_03_22_163425_update_components_table.php
969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateComponentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::dropColumns('components', ['fix_bounds']);
Schema::table('components', function (Blueprint $table) {
$table->string('draw')->after('position')->comment('文字效果');
$table->integer('fade_time')->after('draw')->default(1500)->comment('fade切换时间(毫秒)');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropColumns('components', ['draw', 'fade_time']);
Schema::table('components', function (Blueprint $table) {
$table->string('fix_bounds')->after('opacity')->comment('超出避免剪切');
});
}
}