Commit 76528460 authored by 王源's avatar 王源 🎧

修改生产迁移文件名规则

parent 3ab5ba76
...@@ -924,7 +924,7 @@ class MakeModelCommand extends HyperfCommand ...@@ -924,7 +924,7 @@ class MakeModelCommand extends HyperfCommand
$table = $this->table; $table = $this->table;
$className = "Create" . Str::studly($table) . "Table"; $className = "Create" . Str::studly($table) . "Table";
$file = $folder . "/" . $this->getDatePrefix() . "_" . $this->tableIndex . "_create_" . $table . "_table.php"; $file = $folder . "/" . $this->getDatePrefix() . "_create_" . $table . "_table.php";
$content = file_get_contents($stubFile); $content = file_get_contents($stubFile);
$info = $this->currentTableStructure; $info = $this->currentTableStructure;
$attributes = []; $attributes = [];
...@@ -1142,7 +1142,7 @@ class MakeModelCommand extends HyperfCommand ...@@ -1142,7 +1142,7 @@ class MakeModelCommand extends HyperfCommand
*/ */
private function getDatePrefix(): string private function getDatePrefix(): string
{ {
return date('Y_m_dHis'); return date('Y_m_d_His');
} }
public function configure() public function configure()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment