mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改数据库
This commit is contained in:
parent
6a7c9a2a0b
commit
191fced9ec
@ -7,16 +7,18 @@ use think\migration\Migrator;
|
|||||||
*/
|
*/
|
||||||
class SystemOplog extends Migrator
|
class SystemOplog extends Migrator
|
||||||
{
|
{
|
||||||
private $name = 'system_oplog';
|
|
||||||
|
|
||||||
public function change()
|
public function change()
|
||||||
{
|
{
|
||||||
|
// 当前操作
|
||||||
|
$table = 'system_oplog';
|
||||||
|
|
||||||
// 存在则跳过
|
// 存在则跳过
|
||||||
if ($this->hasTable($this->name)) {
|
if ($this->hasTable($table)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建数据表
|
// 创建数据表
|
||||||
$this->table($this->name, [
|
$this->table($table, [
|
||||||
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '系统-日志',
|
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '系统-日志',
|
||||||
])
|
])
|
||||||
->addColumn('node', 'string', ['limit' => 200, 'default' => '', 'comment' => '当前操作节点'])
|
->addColumn('node', 'string', ['limit' => 200, 'default' => '', 'comment' => '当前操作节点'])
|
||||||
|
@ -7,16 +7,17 @@ use think\migration\Migrator;
|
|||||||
*/
|
*/
|
||||||
class SystemQueue extends Migrator
|
class SystemQueue extends Migrator
|
||||||
{
|
{
|
||||||
private $name = 'system_queue';
|
|
||||||
|
|
||||||
public function change()
|
public function change()
|
||||||
{
|
{
|
||||||
|
// 当前操作
|
||||||
|
$table = 'system_queue';
|
||||||
|
|
||||||
// 存在则跳过
|
// 存在则跳过
|
||||||
if ($this->hasTable($this->name)) {
|
if ($this->hasTable($table)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 创建数据表
|
// 创建数据表
|
||||||
$this->table($this->name, [
|
$this->table($table, [
|
||||||
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '系统-任务',
|
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '系统-任务',
|
||||||
])
|
])
|
||||||
->addColumn('code', 'string', ['limit' => 20, 'default' => '', 'comment' => '任务编号'])
|
->addColumn('code', 'string', ['limit' => 20, 'default' => '', 'comment' => '任务编号'])
|
||||||
|
@ -15,6 +15,7 @@ class SystemUser extends Migrator
|
|||||||
if ($this->hasTable($this->name)) {
|
if ($this->hasTable($this->name)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建数据表
|
// 创建数据表
|
||||||
$table = $this->table($this->name, [
|
$table = $this->table($this->name, [
|
||||||
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '系统-用户',
|
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '系统-用户',
|
||||||
|
@ -7,16 +7,18 @@ use think\migration\Migrator;
|
|||||||
*/
|
*/
|
||||||
class WechatAuto extends Migrator
|
class WechatAuto extends Migrator
|
||||||
{
|
{
|
||||||
private $name = 'wechat_auto';
|
|
||||||
|
|
||||||
public function change()
|
public function change()
|
||||||
{
|
{
|
||||||
|
// 当前操作
|
||||||
|
$table = 'wechat_auto';
|
||||||
|
|
||||||
// 存在则跳过
|
// 存在则跳过
|
||||||
if ($this->hasTable($this->name)) {
|
if ($this->hasTable($table)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建数据表
|
// 创建数据表
|
||||||
$this->table($this->name, [
|
$this->table($table, [
|
||||||
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '微信-回复',
|
'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '微信-回复',
|
||||||
])
|
])
|
||||||
->addColumn('type', 'string', ['limit' => 20, 'default' => '', 'comment' => '类型(text,image,news)'])
|
->addColumn('type', 'string', ['limit' => 20, 'default' => '', 'comment' => '类型(text,image,news)'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user