mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-28 22:50:19 +00:00
fix: 添加表存在性检查
This commit is contained in:
parent
4621222fa3
commit
14a16a0374
@ -13,6 +13,10 @@ class CreateReportLinksTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('report_links')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::create('report_links', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('rid')->nullable()->default(0)->index()->comment('报告ID');
|
||||
|
||||
@ -8,6 +8,10 @@ return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if (Schema::hasTable('project_task_relations')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::create('project_task_relations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('task_id')->comment('任务ID');
|
||||
|
||||
@ -13,6 +13,10 @@ class CreateUserTagsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('user_tags')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::create('user_tags', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_id')->index()->comment('被标签用户ID');
|
||||
|
||||
@ -13,6 +13,10 @@ class CreateUserTagRecognitionsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('user_tag_recognitions')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::create('user_tag_recognitions', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('tag_id')->index()->comment('标签ID');
|
||||
|
||||
@ -8,6 +8,11 @@ return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if (Schema::hasTable('umeng_logs')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Schema::create('umeng_logs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->text('request')->nullable()->comment('请求参数');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user