Fix: DBTools $seed_path property is now set in the constructor, APPPATH is not always replaced

Fix: Set the right value of seq_vorlagestudiengang_vorlagestudiengang_id before the insert
This commit is contained in:
paolo
2016-06-23 12:29:58 +02:00
parent 8df43d4b6f
commit 38c98531ed
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -16,7 +16,7 @@ class DBTools extends FHC_Controller
*
* @var string
*/
protected $seed_path = APPPATH.'seeds/';
protected $seed_path;
/**
* Seed basename regex
@@ -34,6 +34,8 @@ class DBTools extends FHC_Controller
{
parent::__construct();
$seed_path = APPPATH.'seeds/';
if ($this->input->is_cli_request())
{
$cli = true;
+2 -1
View File
@@ -59,7 +59,8 @@ class Migration_Vorlage extends CI_Migration {
{
echo 'Column public.tbl_vorlagestudiengang.orgform_kurzbz added!';
// Insert Demo Data
$query= "INSERT INTO public.tbl_vorlagestudiengang VALUES ('MailRegistration', 0, 1, '<p>Sehr geehrte/r {anrede} <strong>{vorname} {nachname}</strong>,</p>
$query = "SELECT setval('seq_vorlagestudiengang_vorlagestudiengang_id', (SELECT MAX(vorlagestudiengang_id) FROM public.tbl_vorlagestudiengang));";
$query .= "INSERT INTO public.tbl_vorlagestudiengang VALUES ('MailRegistration', 0, 1, '<p>Sehr geehrte/r {anrede} <strong>{vorname} {nachname}</strong>,</p>
<p>vielen Dank für Ihre Registrierung an unserer Hochschule. Im Anhang senden wir ihnen den Zugangscode.</p>
<p>Code: <code>{code}</code></p>
<p>Unter folgenden Link können sie sich direkt für unser Service einloggen: <a title=\"LoginLink\" href=\"{link}{code}\">{link}{code}</a></p>