mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
adds topic field to the cis_profil_update table and changes the layout of the editProfil Modul
This commit is contained in:
@@ -223,7 +223,7 @@ $tabellen=array(
|
||||
"public.tbl_benutzerfunktion" => array("benutzerfunktion_id","fachbereich_kurzbz","uid","oe_kurzbz","funktion_kurzbz","semester", "datum_von","datum_bis", "updateamum","updatevon","insertamum","insertvon","ext_id","bezeichnung","wochenstunden"),
|
||||
"public.tbl_benutzergruppe" => array("uid","gruppe_kurzbz","studiensemester_kurzbz","updateamum","updatevon","insertamum","insertvon","ext_id"),
|
||||
"public.tbl_bewerbungstermine" => array("bewerbungstermin_id","studiengang_kz","studiensemester_kurzbz","beginn","ende","nachfrist","nachfrist_ende","anmerkung", "insertamum", "insertvon", "updateamum", "updatevon","studienplan_id","nationengruppe_kurzbz"),
|
||||
"public.tbl_cis_profil_update" => array("profil_update_id","uid","requested_change","change_timestamp"),
|
||||
"public.tbl_cis_profil_update" => array("profil_update_id","topic","uid","requested_change","change_timestamp"),
|
||||
"public.tbl_buchungstyp" => array("buchungstyp_kurzbz","beschreibung","standardbetrag","standardtext","aktiv","credit_points"),
|
||||
"public.tbl_dokument" => array("dokument_kurzbz","bezeichnung","ext_id","bezeichnung_mehrsprachig","dokumentbeschreibung_mehrsprachig","ausstellungsdetails"),
|
||||
"public.tbl_dokumentprestudent" => array("dokument_kurzbz","prestudent_id","mitarbeiter_uid","datum","updateamum","updatevon","insertamum","insertvon","ext_id"),
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
{
|
||||
$qry = "CREATE TABLE public.tbl_cis_profil_update (
|
||||
profil_update_id INTEGER NOT NULL,
|
||||
topic VARCHAR(32) NOT NULL,
|
||||
uid VARCHAR(32) NOT NULL,
|
||||
requested_change jsonb NOT NULL,
|
||||
change_timestamp TIMESTAMP NOT NULL,
|
||||
@@ -16,8 +17,9 @@
|
||||
NO MAXVALUE
|
||||
NO MINVALUE
|
||||
CACHE 1;
|
||||
|
||||
ALTER TABLE public.tbl_cis_profil_update ALTER COLUMN profil_update_id SET DEFAULT nextval('public.tbl_cis_profil_update_id_seq');
|
||||
|
||||
ALTER TABLE public.tbl_cis_profil_update ADD CONSTRAINT cis_profil_udpate_topic_uid_unique UNIQUE (uid,topic);
|
||||
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_cis_profil_update TO vilesci;
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_cis_profil_update TO web;
|
||||
@@ -31,35 +33,14 @@
|
||||
echo '<br>public.tbl_cis_profil_update: table created';
|
||||
}
|
||||
|
||||
/* else{
|
||||
$qry = "DROP TABLE public.tbl_cis_profil_update;";
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong> was not able to delete public.tbl_cis_profil_update: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>public.tbl_cis_profil_update: table deleted';
|
||||
} */
|
||||
|
||||
|
||||
/* if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_cis_profil_update(uid, profil_data, profil_changes, change_timestamp) VALUES('ma0594','{\"test\":\"data\"}', NOW());";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Prüfungstyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>test eintrag in public.tbl_cis_profil_update hinzugefügt';
|
||||
} */
|
||||
|
||||
|
||||
//! was used to add an extra column to the table after the table was already created
|
||||
/*
|
||||
|
||||
if(!$result = @$db->db_query("SELECT profil_data FROM public.tbl_cis_profil_update LIMIT 1"))
|
||||
//? would add a column if the column is missing in the table
|
||||
/* if(!$result = @$db->db_query("SELECT topic FROM public.tbl_cis_profil_update LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_cis_profil_update ADD COLUMN profil_data jsonb;";
|
||||
$qry = "ALTER TABLE public.tbl_cis_profil_update ADD COLUMN topic varchar(32) NOT NULL;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_cis_profil_update: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>public.tbl_cis_profil_update: Spalte profil_data hinzugefuegt';
|
||||
} */
|
||||
echo '<br>public.tbl_cis_profil_update: Spalte topic hinzugefuegt';
|
||||
} */
|
||||
Reference in New Issue
Block a user