Skip to content

Commit 83dce82

Browse files
committed
修改迁移文件
1 parent f9f590f commit 83dce82

15 files changed

+36
-36
lines changed

migrations/2021_06_02_192155_create_advice_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public function up(): void
1717
$table->integer('user_id')->comment('用户ID');
1818
$table->string('title', 50)->comment('标题');
1919
$table->longText('content')->comment('内容');
20-
$table->tinyInteger('status', 4)->default('0')->comment('状态(0:待解决,1:已解决,2:关闭)');
20+
$table->tinyInteger('status')->default('0')->comment('状态(0:待解决,1:已解决,2:关闭)');
2121
$table->longText('reply')->comment('回复内容');
22-
$table->tinyInteger('type', 4)->default('0')->comment('类型(0:bug,1:优化,2:混合');
22+
$table->tinyInteger('type')->default('0')->comment('类型(0:bug,1:优化,2:混合');
2323
$table->timestamps();
2424
});
2525
\Hyperf\DbConnection\Db::statement("ALTER TABLE `advice` comment'系统建议表'");//表注释一定加上前缀

migrations/2021_06_02_192209_create_dict_type_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function up(): void
1717
$table->string('dict_name', 100)->comment('字典名称');
1818
$table->string('dict_name', 100)->comment('字典类型');
1919
$table->string('remark', 500)->comment('备注');
20-
$table->tinyInteger('status', 4)->default('0')->comment('状态(0正常 1停用)');
20+
$table->tinyInteger('status')->default('0')->comment('状态(0正常 1停用)');
2121
$table->unique('dict_type', 'dict_type');
2222
$table->timestamps();
2323
});

migrations/2021_06_02_192215_create_dict_data_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public function up(): void
2020
$table->string('dict_type', 100)->comment('字典类型');
2121
$table->string('css_class', 100)->comment('样式属性(其他样式扩展)');
2222
$table->string('list_class', 100)->comment('表格回显样式');
23-
$table->tinyInteger('is_default', 4)->default('1')->comment('是否默认(Y是 N否)');
24-
$table->tinyInteger('status', 4)->default('1')->comment('状态(0正常 1停用)');
23+
$table->tinyInteger('is_default')->default('1')->comment('是否默认(Y是 N否)');
24+
$table->tinyInteger('status')->default('1')->comment('状态(0正常 1停用)');
2525
$table->string('remark', 500)->comment('备注');
2626
$table->timestamps();
2727
});

migrations/2021_06_02_192231_create_notice_table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ public function up(): void
1515
$table->engine = 'InnoDB';
1616
$table->bigIncrements('id');
1717
$table->string('username', 255)->comment('用户名称');
18-
$table->integer('user_id', 11)->comment('用户ID');
18+
$table->integer('user_id')->comment('用户ID');
1919
$table->string('title', 50)->comment('标题');
2020
$table->longText('content')->comment('内容');
21-
$table->integer('public_time', 11)->default('0')->comment('发布时间');
22-
$table->tinyInteger('status', 4)->default('0')->comment('操作系统');
21+
$table->integer('public_time')->default('0')->comment('发布时间');
22+
$table->tinyInteger('status')->default('0')->comment('操作系统');
2323
$table->timestamps();
2424
$table->index('public_time', 'notice_public_time_index');
2525
});

migrations/2021_06_02_192244_create_timed_task_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public function up(): void
2020
$table->string('execute_time', 255)->comment('执行时间');
2121
$table->string('next_execute_time', 255)->comment('下次执行时间');
2222
$table->string('desc', 255)->comment('备注信息');
23-
$table->integer('times', 11)->comment('执行次数');
24-
$table->tinyInteger('status', 4)->default('0')->comment('1:启用 0:禁用');
23+
$table->integer('times')->comment('执行次数');
24+
$table->tinyInteger('status')->default('0')->comment('1:启用 0:禁用');
2525
$table->timestamps();
2626
});
2727
\Hyperf\DbConnection\Db::statement("ALTER TABLE `timed_task` comment'定时任务表'");//表注释一定加上前缀

migrations/2021_06_02_192249_create_timed_task_log_table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ public function up(): void
1414
Schema::create('timed_task_log', function (Blueprint $table) {
1515
$table->engine = 'InnoDB';
1616
$table->bigIncrements('id');
17-
$table->integer('task_id', 11)->comment('任务ID');
17+
$table->integer('task_id')->comment('任务ID');
1818
$table->string('task_name', 255)->comment('任务名');
1919
$table->string('task', 255)->comment('任务');
20-
$table->integer('execute_time', 11)->comment('执行时间');
20+
$table->integer('execute_time')->comment('执行时间');
2121
$table->text('error_log')->comment('错误信息');
22-
$table->tinyInteger('result', 4)->default('0')->comment('执行结果 1:成功 0:失败');
22+
$table->tinyInteger('result')->default('0')->comment('执行结果 1:成功 0:失败');
2323
$table->index('task_id', 'task_id_index');
2424
$table->timestamps();
2525
});

migrations/2021_06_02_192258_create_photo_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function up(): void
1414
Schema::create('photo', function (Blueprint $table) {
1515
$table->engine = 'InnoDB';
1616
$table->bigIncrements('id');
17-
$table->tinyInteger('photo_album', 4)->comment('所属相册');
17+
$table->tinyInteger('photo_album')->comment('所属相册');
1818
$table->string('photo_url', 1000)->comment('图片路径');
1919
$table->timestamps();
2020
});

migrations/2021_06_02_192304_create_photo_album_table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ public function up(): void
1717
$table->string('album_name', 191)->default('')->comment('相册名');
1818
$table->string('album_desc', 500)->default('')->comment('相册描述');
1919
$table->string('album_cover', 500)->default('')->comment('相册封面图');
20-
$table->integer('album_type', 11)->default('0')->comment('相册分类');
20+
$table->integer('album_type')->default('0')->comment('相册分类');
2121
$table->string('album_author', 255)->default('0')->comment('相册作者');
22-
$table->integer('album_click_num', 11)->default('0')->comment('相册浏览数');
23-
$table->tinyInteger('album_status', 4)->default('1')->comment('相册状态 1:启用 0:禁用');
22+
$table->integer('album_click_num')->default('0')->comment('相册浏览数');
23+
$table->tinyInteger('album_status')->default('1')->comment('相册状态 1:启用 0:禁用');
2424
$table->string('album_question', 500)->default('1')->comment('访问相册的问题');
2525
$table->string('album_answer', 500)->default('1')->comment('访问相册的密码');
26-
$table->integer('album_sort', 11)->default('99')->comment('相册排序 数字越小越靠前');
26+
$table->integer('album_sort')->default('99')->comment('相册排序 数字越小越靠前');
2727
$table->timestamps();
2828
});
2929
\Hyperf\DbConnection\Db::statement("ALTER TABLE `photo_album` comment'相册'");//表注释一定加上前缀

migrations/2021_06_02_194802_create_ct_friend_chat_history_table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public function up(): void
2121
$table->text('content')->comment('消息内容');
2222
$table->integer('file_size', 11)->default('0')->comment('文件大小');
2323
$table->string('file_name', 255)->default('')->comment('文件名称');
24-
$table->integer('to_uid', 11)->default('0')->comment('接收好友前');
25-
$table->integer('from_uid', 11)->default('0')->comment('发送方');
26-
$table->tinyInteger('reception_state', 3)->default('0')->comment('接受状态 0 未接收 1:接收');
24+
$table->integer('to_uid')->default('0')->comment('接收好友前');
25+
$table->integer('from_uid')->default('0')->comment('发送方');
26+
$table->tinyInteger('reception_state')->default('0')->comment('接受状态 0 未接收 1:接收');
2727
$table->timestamps();
2828
});
2929
\Hyperf\DbConnection\Db::statement("ALTER TABLE `ct_friend_chat_history` comment'好友聊天记录'");//表注释一定加上前缀

migrations/2021_06_02_194812_create_ct_friend_group_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function up(): void
1414
Schema::create('ct_friend_group', function (Blueprint $table) {
1515
$table->engine = 'InnoDB';
1616
$table->bigIncrements('id');
17-
$table->integer('uid', 11)->default('0')->comment('用户ID');
17+
$table->integer('uid')->default('0')->comment('用户ID');
1818
$table->string('friend_group_name', 255)->default('0')->comment('分组名');
1919
$table->index('uid', 'uid_index');
2020
$table->timestamps();

0 commit comments

Comments
 (0)