mirror of
https://github.com/kuaifan/dootask.git
synced 2026-09-06 12:09:20 +00:00
feat(migration): 添加表存在检查以避免重复创建表
This commit is contained in:
parent
ed2f843815
commit
c798faa8db
@ -13,6 +13,9 @@ class CreateManticoreSyncFailuresTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
if (Schema::hasTable('manticore_sync_failures')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Schema::create('manticore_sync_failures', function (Blueprint $table) {
|
Schema::create('manticore_sync_failures', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('data_type', 20)->comment('数据类型: msg/file/task/project/user');
|
$table->string('data_type', 20)->comment('数据类型: msg/file/task/project/user');
|
||||||
|
|||||||
@ -8,6 +8,9 @@ class CreateProjectTaskAiEventsTable extends Migration
|
|||||||
{
|
{
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
if (Schema::hasTable('project_task_ai_events')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Schema::create('project_task_ai_events', function (Blueprint $table) {
|
Schema::create('project_task_ai_events', function (Blueprint $table) {
|
||||||
$table->bigIncrements('id');
|
$table->bigIncrements('id');
|
||||||
$table->bigInteger('task_id')->comment('任务ID');
|
$table->bigInteger('task_id')->comment('任务ID');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user