Moving migrations and scripts

This commit is contained in:
gamonoid
2017-09-04 06:59:14 +02:00
parent 737b392d0a
commit ed36ae0672
15 changed files with 58 additions and 97 deletions

View File

@@ -94,7 +94,7 @@ if($action == "TEST_DB"){
//Run create table script
$insql = file_get_contents(CLIENT_APP_PATH."../data/scripts/".APP_ID."db.sql");
$insql = file_get_contents(CLIENT_APP_PATH."../scripts/".APP_ID."db.sql");
$sql_list = preg_split('/;/',$insql);
foreach($sql_list as $sql){
if (preg_match('/^\s+$/', $sql) || $sql == '') { # skip empty lines
@@ -104,7 +104,7 @@ if($action == "TEST_DB"){
}
//Run create table script
$insql = file_get_contents(CLIENT_APP_PATH."../data/scripts/".APP_ID."_master_data.sql");
$insql = file_get_contents(CLIENT_APP_PATH."../scripts/".APP_ID."_master_data.sql");
$sql_list = preg_split('/;/',$insql);
foreach($sql_list as $sql){
if (preg_match('/^\s+$/', $sql) || $sql == '') { # skip empty lines