mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-14 02:29:27 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user