Removed migrations and seeds directory

This commit is contained in:
Paolo
2019-04-25 17:23:39 +02:00
parent 55636c5bb7
commit 97af0bdc00
14 changed files with 0 additions and 922 deletions
-36
View File
@@ -1,36 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class Migration_Init extends CI_Migration
{
public function up()
{
$this->load->database('system');
// Schemas
echo '<br/>';
$this->db->query('CREATE SCHEMA IF NOT EXISTS public;');
$this->db->query('CREATE SCHEMA IF NOT EXISTS addon;');
$this->db->query('CREATE SCHEMA IF NOT EXISTS fue;');
$this->db->query('CREATE SCHEMA IF NOT EXISTS lehre;');
$this->db->query('CREATE SCHEMA IF NOT EXISTS system;');
$this->db->query('CREATE SCHEMA IF NOT EXISTS bis;');
}
public function down()
{
/* $this->db->query('
DROP SCHEMA IF EXISTS addon;
DROP SCHEMA IF EXISTS bis;
DROP SCHEMA IF EXISTS campus;
DROP SCHEMA IF EXISTS fue;
DROP SCHEMA IF EXISTS kommune;
DROP SCHEMA IF EXISTS lehre;
DROP SCHEMA IF EXISTS public;
DROP SCHEMA IF EXISTS sync;
DROP SCHEMA IF EXISTS system;
DROP SCHEMA IF EXISTS testtool;
DROP SCHEMA IF EXISTS wawi;
');*/
}
}
@@ -1,36 +0,0 @@
<?php
if (! defined("BASEPATH")) exit("No direct script access allowed");
require_once APPPATH . "/libraries/MigrationLib.php";
class Migration_Pk_migrations extends MigrationLib
{
public function __construct()
{
parent::__construct();
}
public function up()
{
$this->startUP();
$this->addPrimaryKey(
"public",
"ci_migrations",
"pk_migrations",
array("version")
);
$this->endUP();
}
public function down()
{
$this->startDown();
$this->execQuery('ALTER TABLE ci_migrations DROP CONSTRAINT pk_migrations');
$this->endDown();
}
}
-60
View File
@@ -1,60 +0,0 @@
<?php
if (! defined("BASEPATH")) exit("No direct script access allowed");
require_once APPPATH . "/libraries/MigrationLib.php";
class Migration_Add_apikey extends MigrationLib
{
public function __construct()
{
parent::__construct();
}
public function up()
{
$this->startUP();
// Create table public.ci_apikey
$fields = array(
"apikey_id" => array(
"type" => "serial"
),
"key" => array(
"type" => "varchar(100)",
"null" => false
),
"level" => array(
"type" => "integer",
"null" => true
),
"ignore_limits" => array(
"type" => "integer",
"null" => true
),
"date_created" => array(
"type" => "date DEFAULT NOW()",
"null" => true
)
);
$this->createTable("public", "ci_apikey", $fields);
$this->addPrimaryKey(
"public",
"ci_apikey",
"pk_ci_apikey",
array("apikey_id")
);
$this->grantTable(array("SELECT"), "public", "ci_apikey", "vilesci");
$this->endUP();
}
public function down()
{
$this->startDown();
$this->dropTable("public", "ci_apikey");
$this->endDown();
}
}
@@ -1,34 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class Migration_Create_basedb extends CI_Migration
{
public function up()
{
//$this->load->database('system');
if (!$this->db->table_exists('tbl_person'))
{
$this->load->helper('file');
$sqlfile = read_file('./system/fhcomplete3.0.sql');
if (!$this->db->simple_query($sqlfile))
{
echo "Error creating Basis DB-Schema!";
}
}
}
public function down()
{
/*$this->db->simple_query('DROP SCHEMA bis;');
$this->db->simple_query('DROP SCHEMA campus;');
$this->db->simple_query('DROP SCHEMA fue;');
$this->db->simple_query('DROP SCHEMA kommune;');
$this->db->simple_query('DROP SCHEMA lehre;');
$this->db->simple_query('DROP SCHEMA sync;');
$this->db->simple_query('DROP SCHEMA system;');
$this->db->simple_query('DROP SCHEMA testtool;');
$this->db->simple_query('DROP SCHEMA wawi;');*/
}
}
-24
View File
@@ -1,24 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once(dirname(__FILE__).'/../../include/basis_db.class.php');
class Migration_fhc30 extends CI_Migration
{
public function up()
{
echo '<br/><h1>Update to FHC 3.0</h1><br/>';
$this->db=$this->load->database('system', true);
$db = new basis_db($this);
require_once('./system/dbupdate_3.0.php');
}
public function down()
{
/*$this->db->simple_query('DROP TABLE fue.tbl_scrumteam;');
$this->db->simple_query('DROP TABLE lehre.tbl_studienordnung;');
$this->db->simple_query('DROP TABLE lehre.tbl_studienordnung_semester;');
$this->db->simple_query('DROP TABLE lehre.tbl_studienplan;');*/
}
}
-29
View File
@@ -1,29 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once(dirname(__FILE__).'/../../include/basis_db.class.php');
class Migration_fhc31 extends CI_Migration
{
public function up()
{
echo '<br/><h1>Update to FHC 3.1</h1><br/>';
$this->db=$this->load->database('system', true);
$db = new basis_db($this);
require_once('./system/dbupdate_3.1.php');
}
public function down()
{
/*$this->db->simple_query('DROP SCHEMA bis;');
$this->db->simple_query('DROP SCHEMA campus;');
$this->db->simple_query('DROP SCHEMA fue;');
$this->db->simple_query('DROP SCHEMA kommune;');
$this->db->simple_query('DROP SCHEMA lehre;');
$this->db->simple_query('DROP SCHEMA sync;');
$this->db->simple_query('DROP SCHEMA system;');
$this->db->simple_query('DROP SCHEMA testtool;');
$this->db->simple_query('DROP SCHEMA wawi;');*/
}
}
-29
View File
@@ -1,29 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once(dirname(__FILE__).'/../../include/basis_db.class.php');
class Migration_fhc32 extends CI_Migration
{
public function up()
{
echo '<br/><h1>Update to FHC 3.2</h1><br/>';
$this->db=$this->load->database('system', true);
$db = new basis_db($this);
require_once('./system/dbupdate_3.2.php');
}
public function down()
{
/*$this->db->simple_query('DROP SCHEMA bis;');
$this->db->simple_query('DROP SCHEMA campus;');
$this->db->simple_query('DROP SCHEMA fue;');
$this->db->simple_query('DROP SCHEMA kommune;');
$this->db->simple_query('DROP SCHEMA lehre;');
$this->db->simple_query('DROP SCHEMA sync;');
$this->db->simple_query('DROP SCHEMA system;');
$this->db->simple_query('DROP SCHEMA testtool;');
$this->db->simple_query('DROP SCHEMA wawi;');*/
}
}
-29
View File
@@ -1,29 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once(dirname(__FILE__).'/../../include/basis_db.class.php');
class Migration_fhc33 extends CI_Migration
{
public function up()
{
echo '<br/><h1>Update to FHC 3.3</h1><br/>';
$this->db=$this->load->database('system', true);
$db = new basis_db($this);
require_once('./system/dbupdate_3.3.php');
}
public function down()
{
/*$this->db->simple_query('DROP SCHEMA bis;');
$this->db->simple_query('DROP SCHEMA campus;');
$this->db->simple_query('DROP SCHEMA fue;');
$this->db->simple_query('DROP SCHEMA kommune;');
$this->db->simple_query('DROP SCHEMA lehre;');
$this->db->simple_query('DROP SCHEMA sync;');
$this->db->simple_query('DROP SCHEMA system;');
$this->db->simple_query('DROP SCHEMA testtool;');
$this->db->simple_query('DROP SCHEMA wawi;');*/
}
}
-170
View File
@@ -1,170 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class Seed_Organisation
{
public function seed($limit = 25)
{
// Organisationseinheiten
echo "Seeding more than $limit OEs ";
$this->fhc =& get_instance();
$this->fhc->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
$pre = 'INSERT INTO public.tbl_organisationseinheit VALUES (';
$post = '; ';
//$sql .= "INSERT INTO public.tbl_organisationseinheittyp VALUES ('Seminar'); ";
$sql = "INSERT INTO public.tbl_organisationseinheittyp VALUES ('Lehrgang'); ";
$sql .= "INSERT INTO public.tbl_studiengangstyp VALUES ('d', 'Diplom'); ";
$sql .= "$pre 'fhstp', NULL, 'Fachhochschule St. Pölten', 'Erhalter', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL)$post";
$sql .= "$pre 'depcon', 'fhstp', 'Studienzentrum', 'Studienzentrum', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL)$post";
$sql .= "$pre 'depwi', 'depcon', 'Medien und Wirtschaft', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL)$post";
$sql .= "$pre 'lmsc', 'depwi', 'LMSC', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'depgus', 'depcon', 'Gesundheit', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'ldem', 'depgus', 'LDEM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'depsoz', 'depcon', 'Soziales', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lsbz', 'depsoz', 'LSBZ', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bum', 'depwi', 'BUM', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lmom', 'depwi', 'LMOM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lmmo', 'depwi', 'LMMO', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lmem', 'depwi', 'LMEM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bdi', 'depgus', 'BDI', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lsom', 'depsoz', 'LSOM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'laet', 'depgus', 'LAET', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bpt', 'depgus', 'BPT', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'depet', 'depcon', 'Bahntechnologie und Mobilität', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mbm', 'depet', 'MBM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bmk', 'depwi', 'BMK', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'deptech', 'depcon', 'Medien und Digitale Technologien', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'levd', 'deptech', 'LEVD', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bmt', 'deptech', 'BMT', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lsma', 'depsoz', 'LSMA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'levm', 'depwi', 'LEVM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'dso', 'depsoz', 'DSO', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lmev', 'depwi', 'LMEV', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'levt', 'deptech', 'LEVT', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lcma', 'depwi', 'LCMA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lpmf', 'deptech', 'LPMF', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mdh', 'deptech', 'MDH', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lafg', 'deptech', 'LAFG', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lpwk', 'deptech', 'LPWK', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lwkf', 'deptech', 'LWKF', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bdb', 'depwi', 'BDB', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'dtm', 'deptech', 'DTM', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'dmm', 'depwi', 'DMM', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'dcs', 'deptech', 'DCS', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bid', 'deptech', 'BID', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lvjg', 'depwi', 'LVJG', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lrdm', 'depwi', 'LRDM', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lptm', 'deptech', 'LPTM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mid', 'deptech', 'MID', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lebs', 'depet', 'LEBS', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'depit', 'depcon', 'Informatik und Security', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mis', 'depit', 'MIS', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bmm', 'depwi', 'BMM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bso', 'depsoz', 'BSO', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mmm', 'depwi', 'MMM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'msa', 'depsoz', 'MSA', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lfmr', 'depsoz', 'LFMR', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lspm', 'depsoz', 'LSPM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mso', 'depsoz', 'MSO', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lsbl', 'depsoz', 'LSBL', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lsbm', 'depsoz', 'LSBM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bbm', 'depet', 'BBM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mdm', 'deptech', 'MDM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mmk', 'depwi', 'MMK', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bse', 'deptech', 'BSE', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lspa', 'depsoz', 'LSPA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'ltti', 'depet', 'LTTI', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lcmm', 'depwi', 'LCMM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lmcm', 'depwi', 'LMCM', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lits', 'depit', 'LITS', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bis', 'depit', 'BIS', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bgk', 'depgus', 'BGK', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lfea', 'depet', 'LFEA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lsak', 'depsoz', 'LSAK', 'Seminar', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lksp', 'depsoz', 'LKSP', 'Seminar', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lpvp', 'depgus', 'LPVP', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'latm', 'deptech', 'LATM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lftm', 'deptech', 'LFTM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lsmm', 'depsoz', 'LSMM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lsbt', 'depet', 'LSBT', 'Seminar', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'gw', 'depgus', 'Institut für Gesundheitswissenschaften', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'fhsc', 'fhstp', 'Services', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'fhshsm', 'fhsc', 'Services für Hochschulmanagement und -Organisation', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'peui', 'fhshsm', 'Programmentwicklung und Innovation', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'pers_recht', 'fhshsm', 'Personal und Recht', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'fhsl', 'fhsc', 'Services für Lehre', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'skill', 'fhsl', 'SKILL (Service- und Kompetenzzentrum für Innovatives Lehren und Lernen)', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mkt', 'fhshsm', 'Marketing und Unternehmenskommunikation', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'nsc', 'fhshsm', 'IT und Infrastruktur', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'qm', 'fhshsm', 'Qualitätsmanagement', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'frw', 'fhshsm', 'Finanzwesen und Controlling', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'bibl', 'fhshsm', 'Bibliothek', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'fhsfwt', 'fhsc', 'Services für Forschung und Wissenstransfer', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'csc', 'fhshsm', 'Campus Service Center', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'acc', 'fhshsm', 'Alumni und Career Center', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'luso', 'fhsl', 'Lehr- und Studienorganisation', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'fh_kollegium', 'fhstp', 'FH-Kollegium', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'ro', 'fhsfwt', 'Forschung und Wissenstransfer', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'io', 'fhsfwt', 'International Office', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'recht', 'pers_recht', 'Recht', 'Lehrgang', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'lppm', 'deptech', 'LPPM', 'Lehrgang', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mi', 'deptech', 'Medieninformatik', 'Institut', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'ia', 'depsoz', 'Ilse Arlt Institut für Soziale Inklusionsforschung', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'icmt', 'deptech', 'Institut für CreativeMediaTechnologies', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'gf', 'fhstp', 'Geschäftsführung', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'sf', 'depit', 'Institut für IT Sicherheitsforschung', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'mw', 'depwi', 'Institut für Medienwirtschaft', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'crvg', 'depet', 'Carl Ritter von Ghega Institut für integrierte Mobilitätsforschung', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'hsm', 'fhstp', 'Hochschulmanagement', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'cr', 'fhstp', 'Campus Radio', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'abfctv', 'deptech', 'Ausbildungsfernsehen c-tv', 'Abteilung', true, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
$sql .= "$pre 'jrz', 'depit', 'Josef Ressel-Zentrum für konsolidierte Erkennung gezielter Angriffe', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post";
// Studiengaenge
$pre = 'INSERT INTO public.tbl_studiengang VALUES ';
$post = '; ';
$sql .= "$pre (3, 'bum', 'BUM', 'b', 'BUM', 'BUM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (4, 'bdi', 'BDI', 'b', 'BDI', 'BDI', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (5, 'bpt', 'BPT', 'b', 'BPT', 'BPT', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (6, 'mbm', 'MBM', 'm', 'MBM', 'MBM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (7, 'bmk', 'BMK', 'b', 'BMK', 'BMK', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (8, 'bmt', 'BMT', 'b', 'BMT', 'BMT', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (9, 'dso', 'DSO', 'd', 'DSO', 'DSO', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (10, 'mdh', 'MDH', 'm', 'MDH', 'MDH', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (11, 'bdb', 'BDB', 'b', 'BDB', 'BDB', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (12, 'dtm', 'DTM', 'd', 'DTM', 'DTM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (13, 'dmm', 'DMM', 'd', 'DMM', 'DMM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (14, 'dcs', 'DCS', 'd', 'DCS', 'DCS', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (15, 'bid', 'BID', 'b', 'BID', 'BID', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (16, 'mid', 'MID', 'm', 'MID', 'MID', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (17, 'mis', 'MIS', 'm', 'MIS', 'MIS', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (18, 'bmm', 'BMM', 'b', 'BMM', 'BMM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (19, 'bso', 'BSO', 'b', 'BSO', 'BSO', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (20, 'mmm', 'MMM', 'm', 'MMM', 'MMM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (21, 'msa', 'MSA', 'm', 'MSA', 'MSA', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (22, 'mso', 'MSO', 'm', 'MSO', 'MSO', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (23, 'bbm', 'BBM', 'b', 'BBM', 'BBM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (24, 'mdm', 'MDM', 'm', 'MDM', 'MDM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (25, 'mmk', 'MMK', 'm', 'MMK', 'MMK', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (26, 'bse', 'BSE', 'b', 'BSE', 'BSE', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (27, 'bis', 'BIS', 'b', 'BIS', 'BIS', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$sql .= "$pre (28, 'bgk', 'BGK', 'b', 'BGK', 'BGK', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post";
$this->fhc->db->query($sql);
echo PHP_EOL;
}
public function truncate()
{
//$this->db->query('EMPTY TABLE public.person;');
}
}
-142
View File
@@ -1,142 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class Seed_Studienordnung
{
public function __construct()
{
$this->fhc =& get_instance();
}
public function seed($limit = 25)
{
// Studienordnung
echo "Seeding about $limit Studienordnungen<br/>";
$data = array('studiengang_kz' =>3, 'bezeichnung' => 'BUM-WS2016-VZ');
$res = $this->fhc->db->insert('lehre.tbl_studienordnung', $data);
if (! $res)
die($res);
else
$studienordnung_id = $this->fhc->db->insert_id();
$data = array('studiengang_kz' =>4, 'bezeichnung' => 'BDI-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>5, 'bezeichnung' => 'BPT-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>6, 'bezeichnung' => 'MBM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>7, 'bezeichnung' => 'BMK-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>8, 'bezeichnung' => 'BMT-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>9, 'bezeichnung' => 'DSO-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>10, 'bezeichnung' => 'MDH-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>11, 'bezeichnung' => 'BDB-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>12, 'bezeichnung' => 'DTM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>13, 'bezeichnung' => 'DMM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>14, 'bezeichnung' => 'DCS-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>15, 'bezeichnung' => 'BID-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>16, 'bezeichnung' => 'MID-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>17, 'bezeichnung' => 'MIS-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>18, 'bezeichnung' => 'BMM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>19, 'bezeichnung' => 'BSO-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>20, 'bezeichnung' => 'MMM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>21, 'bezeichnung' => 'MSA-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>22, 'bezeichnung' => 'MSO-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>23, 'bezeichnung' => 'BBM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>24, 'bezeichnung' => 'MDM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>25, 'bezeichnung' => 'MMK-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>26, 'bezeichnung' => 'BSE-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>27, 'bezeichnung' => 'BIS-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
$data = array('studiengang_kz' =>28, 'bezeichnung' => 'BGK-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienordnung', $data);
//Studienplan
echo "Seeding about $limit Studienplaene<br/>";
$data = array('studienordnung_id' => $studienordnung_id, 'bezeichnung' => 'BUM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' => $studienordnung_id+1, 'bezeichnung' => 'BDI-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' => $studienordnung_id+2, 'bezeichnung' => 'BPT-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' => $studienordnung_id+3, 'bezeichnung' => 'MBM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' => $studienordnung_id+4, 'bezeichnung' => 'BMK-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' => $studienordnung_id+5, 'bezeichnung' => 'BMT-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' => $studienordnung_id+6, 'bezeichnung' => 'DSO-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' => $studienordnung_id+7, 'bezeichnung' => 'MDH-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' => $studienordnung_id+8, 'bezeichnung' => 'BDB-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' => $studienordnung_id+9, 'bezeichnung' => 'DTM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' => $studienordnung_id+10, 'bezeichnung' => 'DMM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+11, 'bezeichnung' => 'DCS-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+12, 'bezeichnung' => 'BID-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+13, 'bezeichnung' => 'MID-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+14, 'bezeichnung' => 'MIS-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+15, 'bezeichnung' => 'BMM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+16, 'bezeichnung' => 'BSO-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+17, 'bezeichnung' => 'MMM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+18, 'bezeichnung' => 'MSA-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+19, 'bezeichnung' => 'MSO-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+20, 'bezeichnung' => 'BBM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+21, 'bezeichnung' => 'MDM-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+22, 'bezeichnung' => 'MMK-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+23, 'bezeichnung' => 'BSE-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+24, 'bezeichnung' => 'BIS-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
$data = array('studienordnung_id' =>$studienordnung_id+25, 'bezeichnung' => 'BGK-WS2016-VZ');
$this->fhc->db->insert('lehre.tbl_studienplan', $data);
// Studienplaene
echo PHP_EOL;
}
public function truncate()
{
echo "Truncating Studienordnungen and Studienplaene!";
$this->fhc->db->query('DELETE FROM lehre.tbl_studienplan WHERE studienordnung_id>1;');
$this->fhc->db->query('DELETE FROM lehre.tbl_studienordnung WHERE studienordnung_id>1;');
}
}
-50
View File
@@ -1,50 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class Seed_Person
{
public function __construct()
{
$this->fhc =& get_instance();
}
public function seed($limit = 200)
{
echo "Seeding $limit persons ";
for ($i = 0; $i < $limit; $i++)
{
echo ".";
$data = array(
// 'username' => $this->faker->unique()->userName, // get a unique nickname
'vorname' => $this->fhc->faker->firstName,
'vornamen' => $this->fhc->faker->firstName,
'nachname' => $this->fhc->faker->lastName,
//'address' => $this->faker->streetAddress,
'gebort' => $this->fhc->faker->city,
//'state' => $this->faker->state,
//'country' => $this->faker->country,
//'postcode' => $this->faker->postcode,
//'email' => $this->faker->email,
//'email_verified' => mt_rand(0, 1) ? '0' : '1',
//'phone' => $this->faker->phoneNumber,
'gebdatum' => $this->fhc->faker->dateTimeThisCentury->format('Y-m-d H:i:s'),
//'registration_date' => $this->faker->dateTimeThisYear->format('Y-m-d H:i:s'),
//'ip_address' => mt_rand(0, 1) ? $this->faker->ipv4 : $this->faker->ipv6,
);
$this->fhc->db->insert('public.tbl_person', $data);
}
echo PHP_EOL;
}
public function truncate()
{
$this->fhc->db->query('DELETE FROM public.tbl_person WHERE person_id>2;');
}
}
-58
View File
@@ -1,58 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Seed_Prestudent
{
public function __construct()
{
$this->fhc =& get_instance();
}
public function seed($limit = 25)
{
echo "Seeding $limit prestudents ";
$person = $this->fhc->db->query('SELECT person_id FROM public.tbl_person WHERE person_id>2 AND person_id%5!=0 LIMIT 100;');
$studplan = $this->fhc->db->query('SELECT oe_kurzbz, studiengang_kz, studienplan_id from public.tbl_studiengang JOIN lehre.tbl_studienordnung USING (studiengang_kz) JOIN lehre.tbl_studienplan USING (studienordnung_id) LIMIT 100;');
$studrows = $studplan->num_rows();
$studplan = $studplan->result();
$i = 0;
foreach ($person->result() as $p)
{
$studrow = $i % $studrows;
// Prestudent
$data = array(
'person_id' => $p->person_id,
'aufmerksamdurch_kurzbz' => 'k.A.',
'studiengang_kz' => $studplan[$studrow]->studiengang_kz
);
$this->fhc->db->insert('public.tbl_prestudent',$data);
$id = $this->fhc->db->insert_id();
// Prestudentstatus
$data = array(
'prestudent_id' => $id,
'status_kurzbz' => 'Interessent',
'studiensemester_kurzbz' => 'WS2016',
'datum' => 'now()',
'studienplan_id' => $studplan[$studrow]->studienplan_id
);
$this->fhc->db->insert('public.tbl_prestudentstatus',$data);
echo ".";
if (++$i>$limit)
break;
}
echo PHP_EOL;
}
public function truncate()
{
$this->fhc->db->query('DELETE FROM public.tbl_prestudent;');
}
}
-55
View File
@@ -1,55 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Seed_Message
{
public function __construct()
{
$this->fhc =& get_instance();
$this->fhc->load->helper('fhc');
}
public function seed($limit = 50)
{
echo "Seeding $limit messages ";
// fetch some persons
$db = $this->fhc->db->query('SELECT person_id FROM public.tbl_person LIMIT 100;');
$person = $db->result();
$num_persons = $db->num_rows();
for ($i = 0; $i < $limit; $i++)
{
echo ".";
$data = array
(
'subject' => $this->fhc->faker->sentence(4, true),
'body' => $this->fhc->faker->text(400),
'person_id' => $person[$i%$num_persons]->person_id
);
$this->fhc->db->insert('public.tbl_msg_message', $data);
$message_id = $this->fhc->db->insert_id();
$data = array
(
'message_id' => $message_id,
'person_id' => $person[$i%($num_persons-1)+1]->person_id,
'token' => generateToken(),
'insertvon' => 'seed'
);
$recipient = $this->fhc->db->insert('public.tbl_msg_recipient', $data);
if (!$recipient)
show_error($recipient);
}
echo PHP_EOL;
}
public function truncate()
{
$this->fhc->db->query('DELETE FROM public.msg_message;');
}
}
-170
View File
@@ -1,170 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Seed_Vorlage
{
public function __construct()
{
$this->fhc =& get_instance();
}
public function seed()
{
echo "Seeding Standard templates (Vorlage) ";
// OEen ohne Eltern holen
$query = 'SELECT oe_kurzbz FROM public.tbl_organisationseinheit WHERE oe_parent_kurzbz IS NULL;';
$oe = $this->fhc->db->query($query)->result();
// ************** Mail Registration Conf ******************
// Insert Template MailRegistrationConfirmation
$query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailRegistrationConfirmation', 'eMail zur Bestätigung der Registrierung', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Vorname\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Nachname\" }, \"code\": { \"type\": \"string\", \"description\": \"Accesscode\", \"minLength\": 6, \"default\": \"1q2w3e4r5t6z7u8i9o0\" }, \"link\": { \"type\": \"string\", \"description\": \"LoginURL\", \"minLength\": 6, \"default\": \"https://demo.fhcomplete.org/addons/aufnahme/cis/index.php/\" } }}');
";
if (! $this->fhc->db->simple_query($query))
echo "Error adding Template MailRegistrationConfirmation!";
// Insert Vorlagetext for MailRegistration
foreach ($oe as $o)
{
$query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailRegistrationConfirmation', 0, 1, '<p>Vielen Dank für Ihre Anmeldung!</p>
<p>Bitte klicken Sie folgenden Link, um Ihre Anmeldung zu bestätigen:<br /><a title=\"LoginLink\" href=\"{link}\">{link}</a></p>
<p>Ihre Anmeldedaten:<br/>
Code: <code>{code}</code><br/>
eMail: <code>{eMailAdresse}</code></p>
<p>Mit freundlichen Grüßen,<br/>FH Complete</p>', '$o->oe_kurzbz','German','Registration');
";
if ($this->fhc->db->simple_query($query))
echo 'Added Tamplate MailRegistrationConfirmation for OE:'.$o->oe_kurzbz.' ';
}
// ************** Mail Application Conf ******************
// Insert Template MailApplicationConfirmation
$query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailApplicationConfirmation', 'eMail zur Bestätigung der Bewerbung', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Max\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Mustermann\" }, \"typ\": { \"type\": \"string\", \"description\": \"Studiengangstyp\", \"minLength\": 1, \"default\": \"Bachelor\" }, \"studiengang\": { \"type\": \"string\", \"description\": \"Studiengangsbezeichnung\", \"minLength\": 3, \"default\": \"Medientechnik\" } }}');
";
if (! $this->fhc->db->simple_query($query))
echo "Error adding Template MailApplicationConfirmation!";
// Insert Vorlagetext for MailApplicationConfirmation
foreach ($oe as $o)
{
$query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailApplicationConfirmation', 0, 1, '<p>Sehr geehrter Herr {vorname} {nachname}!</p>
<p>Wir freuen uns über Ihre Bewerbung für das Studium {typ} {studiengang} an unserer Fachhochschule und bestätigen den Erhalt Ihrer Bewerbungsunterlagen. Ihre Bewerbung wird von uns bearbeitet und die Zugangsvoraussetzungen geprüft. Im Falle von Unklarheiten melden wir uns bei Ihnen.</p>
<p>Über die endgültige Aufnahme wird nach Abschluss des Aufnahmeverfahrens entschieden.
Bitte melden Sie sich für einen Aufnahmetermin an, sofern Sie das noch nicht erledigt haben.</p>
<p>Bei Fragen stehen wir Ihnen gerne zur Verfügung!</p>
<p>Mit freundlichen Grüßen<br/>
FH Complete</p>
<code>
Fachhochschule FHComplete<br/>
Demostrasse 15,<br/>
1234 Ortsname<br/>
T: +43/555/123 456 - 200<br/>
F: +43/555/123 456 - 339<br/>
M: bewerbung@example.com<br/>
I: www.example.com<br/>
</code>
<br/>
________________________
<br/>
<p>Dear {vorname} {nachname}!</p>
<p>Thank you for your application for  the degree program {typ} {studiengang} at our University, which we hereby confirm. Your application is currently being processed and the admission requirements checked. We will contact you if something is not clear.
Decisions concerning admission will be made after the application process has been finalized. We would ask you to register for an admission date if you have not already done so.</p>
<p>In the event of any questions, please do not hesitate to contact:
<p>Yours sincerely,<br/>
FH Complete</p>
<code>
Fachhochschule FHComplete<br/>
Demostrasse 15,<br/>
1234 Ortsname<br/>
T: +43/555/123 456 - 200<br/>
F: +43/555/123 456 - 339<br/>
M: bewerbung@example.com<br/>
I: www.example.com<br/>
</code>', '$o->oe_kurzbz','German','Registrierung');
";
if ($this->fhc->db->simple_query($query))
echo 'Added Tamplate MailApplicationConfirmation for OE:'.$o->oe_kurzbz.' ';
}
// ************** Mail Appointment Conf ******************
// Insert Template MailAppointmentConfirmation
$query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailAppointmentConfirmation', 'eMail zur Bestätigung des Aufnahmetermins', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Vorname\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Nachname\" }, \"typ\": { \"type\": \"string\", \"description\": \"Studiengangstyp\", \"minLength\": 1, \"default\": \"Bachelor\" }, \"studiengang\": { \"type\": \"string\", \"description\": \"Studiengangsbezeichnung\", \"minLength\": 3, \"default\": \"Studiengang\" }, \"orgform\": { \"type\": \"string\", \"description\": \"Organisationsform\", \"minLength\": 2, \"default\": \"Vollzeit\" }, \"termin\": { \"type\": \"string\", \"description\": \"Aufnahmetermin\", \"minLength\": 1, \"default\": \"Dummytermin:11.22.3333, 44:55\" } }}');
";
if (! $this->fhc->db->simple_query($query))
echo "Error adding Template MailAppointmentConfirmation!";
// Insert Vorlagetext for MailAppointmentConfirmation
foreach ($oe as $o)
{
$query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailAppointmentConfirmation', 0, 1, '<p>Vielen Dank für Ihre Anmeldung zum Aufnahmetermin des {typ}-Studiengangs {studiengang} ({orgform})!</p>
<p>Sie haben folgenden Aufnahmetermin ausgewählt:
{termin}</p>
<p>Unser Aufnahmeverfahren besteht aus einem computergestützten, bildungsneutralen Test sowie einem Aufnahmegespräch. Informationen zum genauen Ablauf des Aufnahmetages erhalten Sie ca. eine Woche vor dem Termin per E-Mail. Bitte reservieren Sie sich aber vorerst den ganzen Tag. Die Einteilung ist abhängig von der Anzahl der BewerberInnen.</p>
<p>Wir bitten Sie, sich rechtzeitig zu Ihrem ausgewählten Termin am Fachhochschulstandort am Informationstreffpunkt im Erdgeschoß einzufinden. Die Registrierung zur Testteilnahme erfolgt jeweils 45 Min. vor Testbeginn.
Zur persönlichen Identifikation ist es erforderlich, einen aktuellen Lichtbildausweis (Führerschein oder Pass) vorzulegen.</p>
<p>Die Ergebnisse werden erst nach Abschluss des gesamten Aufnahmeverfahrens innerhalb von 14 Tagen nach dem letzten Aufnahmetermin bekannt gegeben.</p>
<p>Wir wünschen Ihnen viel Erfolg für das Aufnahmeverfahren!</p>
<p>Bei Fragen stehen wir Ihnen gerne zur Verfügung!<br/>
Mit freundlichen Grüßen,<br/>
FH Complete</p>
<code>
Fachhochschule FHComplete<br/>
Demostrasse 15,<br/>
1234 Ortsname<br/>
T: +43/555/123 456 - 200<br/>
F: +43/555/123 456 - 339<br/>
M: bewerbung@example.com<br/>
I: www.example.com<br/></code>
<p>Achtung!<br/>
Antworten Sie nicht direkt auf diese Mail, da diese Mailadresse nur dem Versenden von Mails dient.<br/>
Bitte wenden Sie sich direkt an das zuständige Studiengangssekretariat.', '$o->oe_kurzbz','German','Bestätigung Aufnahmetermin');
";
if ($this->fhc->db->simple_query($query))
echo 'Added Tamplate MailAppointmentConfirmation for OE:'.$o->oe_kurzbz.' ';
}
// ************** Mail Status Confirmation Interessent ******************
// Insert Template MailStatConfirmInteressent
$query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailStatConfirmInteressent', 'Zulassung zum Aufnahmeverfahren', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Vorname\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Nachname\" }, \"typ\": { \"type\": \"string\", \"description\": \"Studiengangstyp\", \"minLength\": 1, \"default\": \"Bachelor\" }, \"studiengang\": { \"type\": \"string\", \"description\": \"Studiengangsbezeichnung\", \"minLength\": 3, \"default\": \"Studiengang\" }, \"orgform\": { \"type\": \"string\", \"description\": \"Organisationsform\", \"minLength\": 2, \"default\": \"Vollzeit\" }, \"stgMail\": { \"type\": \"string\", \"description\": \"StudiengangsMailAdresse\", \"minLength\": 1, \"default\": \"xxx@example.com\" } }}');
";
if (! $this->fhc->db->simple_query($query))
echo "Error adding Template MailAppointmentConfirmation!";
// Insert Vorlagetext for MailAppointmentConfirmation
foreach ($oe as $o)
{
$query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailStatConfirmInteressent', 0, 1, 'Sehr geehrte/r {anrede} {vorname} {nachname},
Sie haben die notwendigen Zugangsvoraussetzungen zum {typ}-Studiengang {studiengang} ({orgform}) erfüllt und sind nun für das Aufnahmeverfahren zugelassen.
Bitte wählen Sie Ihren gewünschten Termin in der Online Bewerbung unter dem Menüpunkt „Aufnahmetermine“ aus.
Bei Fragen stehen wir Ihnen gerne unter {stgMail} zur Verfügung!
Mit freundlichen Grüßen,
Studiengang {studiengang}
<code>
Fachhochschule FHComplete<br/>
Demostrasse 15,<br/>
1234 Ortsname<br/>
T: +43/555/123 456 - 200<br/>
F: +43/555/123 456 - 339<br/>
M: bewerbung@example.com<br/>
I: www.example.com<br/>
</code>
<p>Achtung!<br/>
Antworten Sie nicht direkt auf diese Mail, da diese Mailadresse nur dem Versenden von Mails dient.<br/>
Bitte wenden Sie sich direkt an das zuständige Studiengangssekretariat. ({stgMail})', '$o->oe_kurzbz','German','Zulassung zum Aufnahmeverfahren');
";
if ($this->fhc->db->simple_query($query))
echo 'Added Tamplate MailAppointmentConfirmation for OE:'.$o->oe_kurzbz.' ';
}
echo PHP_EOL;
}
public function truncate()
{
//$this->fhc->db->query("DELETE FROM public.tbl_vorlage WHERE mimetype='text/html';");
}
}