mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 03:22:51 +08:00
数据库安装文件增加file例子字段
This commit is contained in:
@@ -15,8 +15,8 @@ use think\facade\View;
|
|||||||
|
|
||||||
class Migrate extends Command
|
class Migrate extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $table;
|
protected $table;
|
||||||
|
protected $database;
|
||||||
protected $tablePrefix;
|
protected $tablePrefix;
|
||||||
|
|
||||||
protected function configure()
|
protected function configure()
|
||||||
@@ -171,7 +171,7 @@ class Migrate extends Command
|
|||||||
} else {
|
} else {
|
||||||
$table_keys[] = $column['Field'];
|
$table_keys[] = $column['Field'];
|
||||||
}
|
}
|
||||||
} else if ($key == 'UNI') {
|
} elseif ($key == 'UNI') {
|
||||||
$table_keys_uni[] = $column['Field'];
|
$table_keys_uni[] = $column['Field'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -196,11 +196,11 @@ class Migrate extends Command
|
|||||||
|
|
||||||
foreach ($column_item_set['options'] as $key => $option) {
|
foreach ($column_item_set['options'] as $key => $option) {
|
||||||
|
|
||||||
if(is_array($option)){
|
if(is_array($option)) {
|
||||||
|
|
||||||
$column_item_set['options'][$key] = "[".implode(',',$option)."]";
|
$column_item_set['options'][$key] = "[".implode(',', $option)."]";
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
$column_item_set['options'][$key] = "'{$option}'";
|
$column_item_set['options'][$key] = "'{$option}'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ class MallGoods extends Migrator
|
|||||||
->addColumn(Column::integer('create_time')->setLimit(11)->setUnsigned()->setDefault(0)->setComment('创建时间'))
|
->addColumn(Column::integer('create_time')->setLimit(11)->setUnsigned()->setDefault(0)->setComment('创建时间'))
|
||||||
->addColumn(Column::integer('update_time')->setLimit(11)->setUnsigned()->setDefault(0))
|
->addColumn(Column::integer('update_time')->setLimit(11)->setUnsigned()->setDefault(0))
|
||||||
->addColumn(Column::integer('delete_time')->setLimit(11)->setUnsigned()->setDefault(0))
|
->addColumn(Column::integer('delete_time')->setLimit(11)->setUnsigned()->setDefault(0))
|
||||||
|
->addColumn('license', 'string', ['limit' => '100', 'null' => '0', 'comment' => '授权文件 {file}', ])
|
||||||
|
->addColumn('license_name', 'string', ['limit' => '100', 'null' => '0', 'comment' => '授权文件名称', ])
|
||||||
->addIndex('cate_id')
|
->addIndex('cate_id')
|
||||||
->addIndex('delete_time')
|
->addIndex('delete_time')
|
||||||
->create();
|
->create();
|
||||||
|
|||||||
Reference in New Issue
Block a user