diff --git a/application/migrations/012_bewerbungsfrist.php b/application/migrations/012_bewerbungsfrist.php index 63952bd26..86ce58ea3 100644 --- a/application/migrations/012_bewerbungsfrist.php +++ b/application/migrations/012_bewerbungsfrist.php @@ -1,8 +1,8 @@ array( - "type" => "integer", - "auto_increment" => true + 'bewerbungsfrist_id' => array( + 'type' => 'integer', + 'auto_increment' => true ), - "studiensemester_kurzbz" => array( - "type" => "varchar(16)" + 'studiensemester_kurzbz' => array( + 'type' => 'varchar(16)' ), - "begin" => array( - "type" => "date" + 'begin' => array( + 'type' => 'date' ), - "ende" => array( - "type" => "date" + 'ende' => array( + 'type' => 'date' ), - "ende" => array( - "type" => "date" + 'ende' => array( + 'type' => 'date' ), - "nachfrist" => array( - "type" => "boolean DEFAULT FALSE", - "null" => true + 'nachfrist' => array( + 'type' => 'boolean DEFAULT FALSE', + 'null' => true ), - "nachfristende" => array( - "type" => "date", - "null" => true + 'nachfristende' => array( + 'type' => 'date', + 'null' => true ), - "anmerkung" => array( - "type" => "text" + 'anmerkung' => array( + 'type' => 'text' ), - "insertamum" => array( - "type" => "timestamp DEFAULT NOW()", - "null" => true + 'insertamum' => array( + 'type' => 'timestamp DEFAULT NOW()', + 'null' => true ), - "insertvon" => array( - "type" => "varchar(32)", - "null" => true + 'insertvon' => array( + 'type' => 'varchar(32)', + 'null' => true ), - "updateamum" => array( - "type" => "timestamp DEFAULT NOW()", - "null" => true + 'updateamum' => array( + 'type' => 'timestamp DEFAULT NOW()', + 'null' => true ), - "updatevon" => array( - "type" => "varchar(32)", - "null" => true + 'updatevon' => array( + 'type' => 'varchar(32)', + 'null' => true ) ); - $this->createTable("lehre", "tbl_bewerbungsfrist", $fields); + $this->createTable('lehre', 'tbl_bewerbungsfrist', $fields); $this->addPrimaryKey( - "lehre", - "tbl_bewerbungsfrist", - "pk_tbl_bewerbungsfrist", - array("bewerbungsfrist_id") + 'lehre', + 'tbl_bewerbungsfrist', + 'pk_tbl_bewerbungsfrist', + array('bewerbungsfrist_id') ); $this->addForeingKey( - "lehre", - "tbl_bewerbungsfrist", - "fk_bewerbungsfrist_studiensemester_kurzbz", - "studiensemester_kurzbz", - "public", - "tbl_studiensemester", - "studiensemester_kurzbz", - "ON UPDATE CASCADE ON DELETE RESTRICT" + 'lehre', + 'tbl_bewerbungsfrist', + 'fk_bewerbungsfrist_studiensemester_kurzbz', + 'studiensemester_kurzbz', + 'public', + 'tbl_studiensemester', + 'studiensemester_kurzbz', + 'ON UPDATE CASCADE ON DELETE RESTRICT' ); - $this->grantTable("SELECT", "lehre", "tbl_bewerbungsfrist", "web"); - $this->grantTable(array("SELECT", "INSERT", "DELETE", "UPDATE"), "lehre", "tbl_bewerbungsfrist", "admin"); - $this->grantTable(array("SELECT", "INSERT", "DELETE", "UPDATE"), "lehre", "tbl_bewerbungsfrist", "vilesci"); + $this->grantTable('SELECT', 'lehre', 'tbl_bewerbungsfrist', 'web'); + $this->grantTable(array('SELECT', 'INSERT', 'DELETE', 'UPDATE'), 'lehre', 'tbl_bewerbungsfrist', 'admin'); + $this->grantTable(array('SELECT', 'INSERT', 'DELETE', 'UPDATE'), 'lehre', 'tbl_bewerbungsfrist', 'vilesci'); + $this->grantSequence(array('SELECT', 'UPDATE'), 'lehre', 'tbl_bewerbungsfrist_bewerbungsfrist_id_seq', 'web'); + $this->grantSequence(array('SELECT', 'UPDATE'), 'lehre', 'tbl_bewerbungsfrist_bewerbungsfrist_id_seq', 'admin'); + $this->grantSequence(array('SELECT', 'UPDATE'), 'lehre', 'tbl_bewerbungsfrist_bewerbungsfrist_id_seq', 'vilesci'); $this->endUP(); } @@ -89,7 +92,7 @@ class Migration_Bewerbungsfrist extends MigrationLib { $this->startDown(); - $this->dropTable("lehre", "tbl_bewerbungsfrist"); + $this->dropTable('lehre', 'tbl_bewerbungsfrist'); $this->endDown(); } diff --git a/application/migrations/016_bewerbungsfrist2.php b/application/migrations/016_bewerbungsfrist2.php index d85fd4a1c..8eeffb966 100644 --- a/application/migrations/016_bewerbungsfrist2.php +++ b/application/migrations/016_bewerbungsfrist2.php @@ -1,8 +1,8 @@ startUP(); - $this->dropTable("lehre", "tbl_bewerbungsfrist"); + $this->dropTable('lehre', 'tbl_bewerbungsfrist'); $this->endUP(); } @@ -26,70 +26,73 @@ class Migration_Bewerbungsfrist2 extends MigrationLib // Create table lehre.tbl_bewerbungsfrist $fields = array( - "bewerbungsfrist_id" => array( - "type" => "integer", - "auto_increment" => true + 'bewerbungsfrist_id' => array( + 'type' => 'integer', + 'auto_increment' => true ), - "studiensemester_kurzbz" => array( - "type" => "varchar(16)" + 'studiensemester_kurzbz' => array( + 'type' => 'varchar(16)' ), - "begin" => array( - "type" => "date" + 'begin' => array( + 'type' => 'date' ), - "ende" => array( - "type" => "date" + 'ende' => array( + 'type' => 'date' ), - "ende" => array( - "type" => "date" + 'ende' => array( + 'type' => 'date' ), - "nachfrist" => array( - "type" => "boolean DEFAULT FALSE", - "null" => true + 'nachfrist' => array( + 'type' => 'boolean DEFAULT FALSE', + 'null' => true ), - "nachfristende" => array( - "type" => "date", - "null" => true + 'nachfristende' => array( + 'type' => 'date', + 'null' => true ), - "anmerkung" => array( - "type" => "text" + 'anmerkung' => array( + 'type' => 'text' ), - "insertamum" => array( - "type" => "timestamp DEFAULT NOW()", - "null" => true + 'insertamum' => array( + 'type' => 'timestamp DEFAULT NOW()', + 'null' => true ), - "insertvon" => array( - "type" => "varchar(32)", - "null" => true + 'insertvon' => array( + 'type' => 'varchar(32)', + 'null' => true ), - "updateamum" => array( - "type" => "timestamp DEFAULT NOW()", - "null" => true + 'updateamum' => array( + 'type' => 'timestamp DEFAULT NOW()', + 'null' => true ), - "updatevon" => array( - "type" => "varchar(32)", - "null" => true + 'updatevon' => array( + 'type' => 'varchar(32)', + 'null' => true ) ); - $this->createTable("lehre", "tbl_bewerbungsfrist", $fields); + $this->createTable('lehre', 'tbl_bewerbungsfrist', $fields); $this->addPrimaryKey( - "lehre", - "tbl_bewerbungsfrist", - "pk_tbl_bewerbungsfrist", - array("bewerbungsfrist_id") + 'lehre', + 'tbl_bewerbungsfrist', + 'pk_tbl_bewerbungsfrist', + array('bewerbungsfrist_id') ); $this->addForeingKey( - "lehre", - "tbl_bewerbungsfrist", - "fk_bewerbungsfrist_studiensemester_kurzbz", - "studiensemester_kurzbz", - "public", - "tbl_studiensemester", - "studiensemester_kurzbz", - "ON UPDATE CASCADE ON DELETE RESTRICT" + 'lehre', + 'tbl_bewerbungsfrist', + 'fk_bewerbungsfrist_studiensemester_kurzbz', + 'studiensemester_kurzbz', + 'public', + 'tbl_studiensemester', + 'studiensemester_kurzbz', + 'ON UPDATE CASCADE ON DELETE RESTRICT' ); - $this->grantTable("SELECT", "lehre", "tbl_bewerbungsfrist", "web"); - $this->grantTable(array("SELECT", "INSERT", "DELETE", "UPDATE"), "lehre", "tbl_bewerbungsfrist", "admin"); - $this->grantTable(array("SELECT", "INSERT", "DELETE", "UPDATE"), "lehre", "tbl_bewerbungsfrist", "vilesci"); + $this->grantTable('SELECT', 'lehre', 'tbl_bewerbungsfrist', 'web'); + $this->grantTable(array('SELECT', 'INSERT', 'DELETE', 'UPDATE'), 'lehre', 'tbl_bewerbungsfrist', 'admin'); + $this->grantTable(array('SELECT', 'INSERT', 'DELETE', 'UPDATE'), 'lehre', 'tbl_bewerbungsfrist', 'vilesci'); + $this->grantSequence(array('SELECT', 'UPDATE'), 'lehre', 'tbl_bewerbungsfrist_bewerbungsfrist_id_seq', 'web'); + $this->grantSequence(array('SELECT', 'UPDATE'), 'lehre', 'tbl_bewerbungsfrist_bewerbungsfrist_id_seq', 'admin'); + $this->grantSequence(array('SELECT', 'UPDATE'), 'lehre', 'tbl_bewerbungsfrist_bewerbungsfrist_id_seq', 'vilesci'); $this->endDown(); } diff --git a/application/migrations/018_status_grund.php b/application/migrations/018_status_grund.php index 81e0691b8..a1377874f 100644 --- a/application/migrations/018_status_grund.php +++ b/application/migrations/018_status_grund.php @@ -1,8 +1,8 @@ startUP(); $fields = array( - "statusgrund_kurzbz" => array( - "type" => "integer", - "auto_increment" => true + 'statusgrund_kurzbz' => array( + 'type' => 'integer', + 'auto_increment' => true ), - "status_kurzbz" => array( - "type" => "varchar(20)" + 'status_kurzbz' => array( + 'type' => 'varchar(20)' ), - "aktiv" => array( - "type" => "boolean DEFAULT FALSE", - "null" => true + 'aktiv' => array( + 'type' => 'boolean DEFAULT FALSE', + 'null' => true ), - "bezeichnung_mehrsprachig" => array( - "type" => "varchar(255)[]" + 'bezeichnung_mehrsprachig' => array( + 'type' => 'varchar(255)[]' ), - "beschreibung" => array( - "type" => "text[]" + 'beschreibung' => array( + 'type' => 'text[]' ) ); - $this->createTable("public", "tbl_status_grund", $fields); + $this->createTable('public', 'tbl_status_grund', $fields); $this->addPrimaryKey( - "public", - "tbl_status_grund", - "pk_tbl_status_grund", - array("statusgrund_kurzbz") + 'public', + 'tbl_status_grund', + 'pk_tbl_status_grund', + array('statusgrund_kurzbz') ); $this->addForeingKey( - "public", - "tbl_status_grund", - "fk_status_grundstatus_kurzbz", - "status_kurzbz", - "public", - "tbl_status", - "status_kurzbz", - "ON UPDATE CASCADE ON DELETE RESTRICT" + 'public', + 'tbl_status_grund', + 'fk_status_grundstatus_kurzbz', + 'status_kurzbz', + 'public', + 'tbl_status', + 'status_kurzbz', + 'ON UPDATE CASCADE ON DELETE RESTRICT' ); - $this->grantTable("SELECT", "public", "tbl_status_grund", "web"); - $this->grantTable(array("SELECT", "INSERT", "DELETE", "UPDATE"), "public", "tbl_status_grund", "admin"); - $this->grantTable(array("SELECT", "INSERT", "DELETE", "UPDATE"), "public", "tbl_status_grund", "vilesci"); + $this->grantTable('SELECT', 'public', 'tbl_status_grund', 'web'); + $this->grantTable(array('SELECT', 'INSERT', 'DELETE', 'UPDATE'), 'public', 'tbl_status_grund', 'admin'); + $this->grantTable(array('SELECT', 'INSERT', 'DELETE', 'UPDATE'), 'public', 'tbl_status_grund', 'vilesci'); + $this->grantSequence(array('SELECT', 'UPDATE'), 'public', 'tbl_status_grund_statusgrund_kurzbz_seq', 'web'); + $this->grantSequence(array('SELECT', 'UPDATE'), 'public', 'tbl_status_grund_statusgrund_kurzbz_seq', 'admin'); + $this->grantSequence(array('SELECT', 'UPDATE'), 'public', 'tbl_status_grund_statusgrund_kurzbz_seq', 'vilesci'); $this->endUP(); } @@ -62,8 +65,8 @@ class Migration_Status_grund extends MigrationLib { $this->startDown(); - $this->dropTable("public", "tbl_status_grund"); + $this->dropTable('public', 'tbl_status_grund'); $this->endDown(); } -} +} \ No newline at end of file