* Copy common folder to tmp.

This commit is contained in:
zhujinyong
2021-09-27 15:27:29 +08:00
parent f1151c37c7
commit 1cf925a37c
3 changed files with 7 additions and 2 deletions
-1
View File
@@ -3,7 +3,6 @@ author: ly
version: "1.0"
fields:
- field: id
note: "ID"
range: 1-10000
- field: company
range: 1
+1 -1
View File
@@ -4,4 +4,4 @@ $builder->programGrade1 = array('rows' => 40, 'data' => array('project', 'progra
$builder->programGrade2 = array('rows' => 40, 'data' => array('project', 'program', 'programgrade2'));
$builder->programGrade3 = array('rows' => 40, 'data' => array('project', 'program', 'programgrade3'));
//$builder->user = array('rows' => 100, 'data' => array('user'));
$builder->user = array('rows' => 100, 'data' => array('user'));
+6
View File
@@ -100,6 +100,12 @@ function zdRun()
$dbh->exec("set names 'utf8'");
$dbh->beginTransaction();
/* Copy common to tmp. */
$tmpCommonPath = RUNTIME_ROOT . 'tmp/common';
if(file_exists($tmpCommonPath)) system("rm -rf $tmpCommonPath");
system("cp -r {$zdRoot}common $tmpCommonPath");
/* Generate SQL files. */
$command = "$zdPath -c %s -d $zdRoot%s -n %s -o {$zdRoot}sql/%s.sql -table %s";
$tables = array();
foreach($builder as $key => $info)