This commit is contained in:
Paminger
2016-02-29 17:02:19 +01:00
parent eb84022abf
commit 642ba3a2dc
3 changed files with 10 additions and 6 deletions
+1
View File
@@ -1,5 +1,6 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
defined('DB_HOST') OR require_once './config/system.config.inc.php'; // For CLI-Migrations
/*
| -------------------------------------------------------------------
+1 -1
View File
@@ -11,7 +11,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| and disable it back when you're done.
|
*/
$config['migration_enabled'] = TRUE;
$config['migration_enabled'] = FALSE;
/*
|--------------------------------------------------------------------------
@@ -6,12 +6,15 @@ class Migration_Create_basedb extends CI_Migration {
public function up()
{
$this->load->helper('file');
$sqlfile = read_file('./system/fhcomplete3.0.sql');
if (!$this->db->simple_query($sqlfile))
if (!$this->db->table_exists('tbl_person'))
{
echo "Error creating Basis DB-Schema!";
$this->load->helper('file');
$sqlfile = read_file('./system/fhcomplete3.0.sql');
if (!$this->db->simple_query($sqlfile))
{
echo "Error creating Basis DB-Schema!";
}
}
}