hasTable('config')) { return; } $config = $this->table('config'); if (!$config->hasColumn('update_time')) { $config->addColumn('update_time', 'biginteger', [ 'limit' => 16, 'signed' => false, 'null' => true, 'default' => null, 'comment' => '更新时间', 'after' => 'weigh', ])->save(); } $config = $this->table('config'); if (!$config->hasColumn('create_time')) { $config->addColumn('create_time', 'biginteger', [ 'limit' => 16, 'signed' => false, 'null' => true, 'default' => null, 'comment' => '创建时间', 'after' => 'update_time', ])->save(); } } public function down(): void { if (!$this->hasTable('config')) { return; } $config = $this->table('config'); if ($config->hasColumn('create_time')) { $config->removeColumn('create_time')->save(); } $config = $this->table('config'); if ($config->hasColumn('update_time')) { $config->removeColumn('update_time')->save(); } } }