2022_06_17_163425_alter_components_table.php
1.57 KB
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
38
39
40
41
42
43
44
45
46
47
48
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterComponentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('components', function (Blueprint $table) {
$table->string('font_file')->after('position')->comment('字体文件路径');
$table->string('text_bg_box')->after('text_bg_color')->comment('背景厚度');
$table->string('fix_bounds')->after('opacity')->comment('超出避免剪切');
});
Schema::table('video_temp', function (Blueprint $table) {
$table->unsignedTinyInteger('bg_music')->after('title')->comment('0=没有,1=有');
$table->string('bgm_url')->nullable()->after('bg_music')->comment('背景音乐地址');
});
Schema::table('admin_make_video', function (Blueprint $table) {
$table->string('weather')->after('feel')->default('')->comment('天气');
$table->string('huangli')->after('weather')->default('')->comment('黄历');
});
Schema::dropColumns('admin_make_video', ['bg_music', 'bgm_url']);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::dropColumns('components', ['font_file','text_bg_box', 'fix_bounds']);
Schema::dropColumns('video_temp', ['bg_music', 'bgm_url']);
Schema::dropColumns('admin_make_video', ['weather', 'huangli']);
}
}