This commit is contained in:
cris-technikum
2018-02-28 11:11:02 +01:00
+379
View File
@@ -1294,6 +1294,384 @@ if($result = @$db->db_query("SELECT is_nullable FROM INFORMATION_SCHEMA.COLUMNS
}
}
// Tabelle person_lock hinzufügen
if (!$result = @$db->db_query("SELECT 1 FROM system.tbl_person_lock LIMIT 1"))
{
$qry = "CREATE TABLE system.tbl_person_lock
(
lock_id bigint NOT NULL,
person_id integer NOT NULL,
uid varchar(32) NOT NULL,
zeitpunkt timestamp NOT NULL DEFAULT now(),
app varchar(32)
);
ALTER TABLE system.tbl_person_lock ADD CONSTRAINT pk_lock PRIMARY KEY (lock_id);
CREATE SEQUENCE system.tbl_person_lock_lock_id_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE system.tbl_person_lock ALTER COLUMN lock_id SET DEFAULT nextval('system.tbl_person_lock_lock_id_seq');
GRANT SELECT, INSERT, DELETE ON system.tbl_person_lock TO vilesci;
GRANT SELECT, INSERT, DELETE ON system.tbl_person_lock TO web;
GRANT SELECT, UPDATE ON system.tbl_person_lock_lock_id_seq TO vilesci;
GRANT SELECT, UPDATE ON system.tbl_person_lock_lock_id_seq TO web;
ALTER TABLE system.tbl_person_lock ADD CONSTRAINT fk_lock_person_id FOREIGN KEY (person_id) REFERENCES public.tbl_person(person_id) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE system.tbl_person_lock ADD CONSTRAINT fk_lock_uid FOREIGN KEY (uid) REFERENCES public.tbl_benutzer(uid) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE system.tbl_person_lock ADD CONSTRAINT fk_lock_app FOREIGN KEY (app) REFERENCES system.tbl_app(app) ON UPDATE CASCADE ON DELETE RESTRICT;";
if (!$db->db_query($qry))
echo '<strong>system.tbl_person_lock '.$db->db_last_error().'</strong><br>';
else
echo ' system.tbl_person_lock hinzugefügt<br>';
}
// INSERT Berechtigungen fuer web User erteilen fuer tbl_msg_status
if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants WHERE table_name='tbl_msg_status' AND table_schema='public' AND grantee='web' AND privilege_type='INSERT'"))
{
if($db->db_num_rows($result)==0)
{
$qry = "GRANT SELECT, INSERT ON public.tbl_msg_status TO web;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_msg_status Berechtigungen: '.$db->db_last_error().'</strong><br>';
else
echo 'INSERT Rechte fuer public.tbl_msg_status fuer web user gesetzt ';
}
}
/**
* Kommentare fuer Datenbanktabellen
*/
if($result = $db->db_query("SELECT obj_description('public.ci_apikey'::regclass) as comment"))
{
if($row = $db->db_fetch_object($result))
{
if($row->comment == '')
{
$qry = "
COMMENT ON TABLE public.ci_apikey IS 'API Keys';
COMMENT ON TABLE public.tbl_adresse IS 'Person and Company Addresses';
COMMENT ON TABLE public.tbl_akte IS 'Documents of Persons';
COMMENT ON TABLE public.tbl_ampel IS 'Notification System';
COMMENT ON TABLE public.tbl_ampel_benutzer_bestaetigt IS 'Accepted Notifications';
COMMENT ON TABLE public.tbl_aufnahmeschluessel IS 'DEPRECATED';
COMMENT ON TABLE public.tbl_aufnahmetermin IS 'DEPRECATED';
COMMENT ON TABLE public.tbl_aufnahmetermintyp IS 'DEPRECATED';
COMMENT ON TABLE public.tbl_aufmerksamdurch IS 'Key-Table of Brand Awareness';
COMMENT ON TABLE public.tbl_bankverbindung IS 'Bank Data of Persons';
COMMENT ON TABLE public.tbl_benutzer IS 'List of Accounts';
COMMENT ON TABLE public.tbl_benutzerfunktion IS 'Functions of Persons';
COMMENT ON TABLE public.tbl_benutzergruppe IS 'Connects Users and Groups';
COMMENT ON TABLE public.tbl_bewerbungstermine IS 'Application Dates';
COMMENT ON TABLE public.tbl_buchungstyp IS 'Key-Table of Payment Types';
COMMENT ON TABLE public.tbl_dokument IS 'Key-Table of Documents';
COMMENT ON TABLE public.tbl_dokumentprestudent IS 'Accepted Documents of Degree Program';
COMMENT ON TABLE public.tbl_dokumentstudiengang IS 'Connection Table of Degree Programs and needed Documents';
COMMENT ON TABLE public.tbl_erhalter IS 'Company Caretaker Information';
COMMENT ON TABLE public.tbl_fachbereich IS 'Institute, Department';
COMMENT ON TABLE public.tbl_filter IS 'Predefined Dropdowns for Reports';
COMMENT ON TABLE public.tbl_firma IS 'Universities, Suppliers, Companies';
COMMENT ON TABLE public.tbl_firma_mobilitaetsprogramm IS 'Mobility programes of Universities';
COMMENT ON TABLE public.tbl_firma_organisationseinheit IS 'Connects Companys with Organisation Units';
COMMENT ON TABLE public.tbl_firmatag IS 'Tags for Companys';
COMMENT ON TABLE public.tbl_firmentyp IS 'Types of Companys';
COMMENT ON TABLE public.tbl_fotostatus IS 'Key-Table of Picture Upload Status';
COMMENT ON TABLE public.tbl_funktion IS 'Key-Table of User Functions';
COMMENT ON TABLE public.tbl_geschaeftsjahr IS 'Finacial Year';
COMMENT ON TABLE public.tbl_gruppe IS 'Study Groups, Mail Groups';
COMMENT ON TABLE public.tbl_kontakt IS 'Contacts of Persons';
COMMENT ON TABLE public.tbl_kontaktmedium IS 'PreInteressenten-Kontakttypen';
COMMENT ON TABLE public.tbl_kontakttyp IS 'Key-Table of Contact Types';
COMMENT ON TABLE public.tbl_konto IS 'Student Payments';
COMMENT ON TABLE public.tbl_lehrverband IS 'List of Groups';
COMMENT ON TABLE public.tbl_log IS 'Logging and Undo';
COMMENT ON TABLE public.tbl_mitarbeiter IS 'Employee Data';
COMMENT ON TABLE public.tbl_msg_attachment IS 'Messages Attachments';
COMMENT ON TABLE public.tbl_msg_message IS 'Messages';
COMMENT ON TABLE public.tbl_msg_recipient IS 'Message Recipients';
COMMENT ON TABLE public.tbl_msg_status IS 'Message Status';
COMMENT ON TABLE public.tbl_notiz IS 'Notes';
COMMENT ON TABLE public.tbl_notiz_dokument IS 'Documents assigned to Notes';
COMMENT ON TABLE public.tbl_notizzuordnung IS 'Connects Notes with Persons, Courses, …';
COMMENT ON TABLE public.tbl_organisationseinheit IS 'Organisation Units';
COMMENT ON TABLE public.tbl_organisationseinheittyp IS 'Key-Table of Types of Organisation Units';
COMMENT ON TABLE public.tbl_ort IS 'Teaching Rooms, Offices';
COMMENT ON TABLE public.tbl_ortraumtyp IS 'Connection of Rooms and Room Types';
COMMENT ON TABLE public.tbl_person IS 'List of all Persons';
COMMENT ON TABLE public.tbl_person_fotostatus IS 'Connects Picture Upload States with Persons';
COMMENT ON TABLE public.tbl_personfunktionstandort IS 'Contact Persons of a Company';
COMMENT ON TABLE public.tbl_preincoming IS 'Incoming Registration';
COMMENT ON TABLE public.tbl_preincoming_lehrveranstaltung IS 'Incoming Courses';
COMMENT ON TABLE public.tbl_preinteressent IS 'DEPRECATED';
COMMENT ON TABLE public.tbl_preinteressentstudiengang IS 'DEPRECATED';
COMMENT ON TABLE public.tbl_preoutgoing IS 'Outgoing Data';
COMMENT ON TABLE public.tbl_preoutgoing_firma IS 'Outgoing University';
COMMENT ON TABLE public.tbl_preoutgoing_lehrveranstaltung IS 'Visited Courses of Outgoings';
COMMENT ON TABLE public.tbl_preoutgoing_preoutgoing_status IS 'Ougoing Status';
COMMENT ON TABLE public.tbl_preoutgoing_status IS 'Key-Table of Outgoing Status';
COMMENT ON TABLE public.tbl_prestudent IS 'Relation Person-DegreeProgram';
COMMENT ON TABLE public.tbl_prestudentstatus IS 'Student History';
COMMENT ON TABLE public.tbl_raumtyp IS 'Room Types';
COMMENT ON TABLE public.tbl_reihungstest IS 'Placement Tests';
COMMENT ON TABLE public.tbl_rt_ort IS 'Connection Room Placementtest';
COMMENT ON TABLE public.tbl_rt_person IS 'Connection Person Placementtest';
COMMENT ON TABLE public.tbl_rt_studienplan IS 'Connection StudyPlan Placementtest';
COMMENT ON TABLE public.tbl_semesterwochen IS 'Number of Weeks per Semester';
COMMENT ON TABLE public.tbl_service IS 'ServiceLevelAgreements';
COMMENT ON TABLE public.tbl_sprache IS 'Key-Table of Languages';
COMMENT ON TABLE public.tbl_standort IS 'Company Locations';
COMMENT ON TABLE public.tbl_statistik IS 'Statistics';
COMMENT ON TABLE public.tbl_status IS 'Key-Table of Student Status';
COMMENT ON TABLE public.tbl_status_grund IS 'Key-Table of Reasons for Student Status Changes';
COMMENT ON TABLE public.tbl_student IS 'List of Students';
COMMENT ON TABLE public.tbl_studentlehrverband IS 'Connection of Students to Semester and Groups';
COMMENT ON TABLE public.tbl_studiengang IS 'List of Degree Programs';
COMMENT ON TABLE public.tbl_studiengangstyp IS 'Key-Table of Degree Program Types';
COMMENT ON TABLE public.tbl_studienjahr IS 'Key-Table of Study Year';
COMMENT ON TABLE public.tbl_studiensemester IS 'Key-Table of Study Semester';
COMMENT ON TABLE public.tbl_tag IS 'Orders and Company Tags';
COMMENT ON TABLE public.tbl_variable IS 'User Variables';
COMMENT ON TABLE public.tbl_vorlage IS 'Key-Table of Document Templates';
COMMENT ON TABLE public.tbl_vorlagedokument IS 'Connects Documents with Templates';
COMMENT ON TABLE public.tbl_vorlagestudiengang IS 'Document Templates of Degree Programs';
COMMENT ON TABLE bis.tbl_archiv IS 'Ministery Report archive';
COMMENT ON TABLE bis.tbl_ausbildung IS 'Key-Table of Highest Education of Employees';
COMMENT ON TABLE bis.tbl_berufstaetigkeit IS 'Key-Table of Professional Activity of Students';
COMMENT ON TABLE bis.tbl_beschaeftigungsart1 IS 'Key-Table of Contract Types';
COMMENT ON TABLE bis.tbl_beschaeftigungsart2 IS 'Key-Table of Contract Types';
COMMENT ON TABLE bis.tbl_beschaeftigungsausmass IS 'Key-Table of Amount of Workinghours';
COMMENT ON TABLE bis.tbl_besqual IS 'Key-Table of Employee Qualification';
COMMENT ON TABLE bis.tbl_bisfunktion IS 'Summary of Teaching Hours per Lector';
COMMENT ON TABLE bis.tbl_bisio IS 'Incoming, Outgoing Mobility';
COMMENT ON TABLE bis.tbl_bisorgform IS 'Official Organisation Forms for BIS-Meldung';
COMMENT ON TABLE bis.tbl_bisverwendung IS 'Employee Contracts';
COMMENT ON TABLE bis.tbl_bundesland IS 'Federal States';
COMMENT ON TABLE bis.tbl_entwicklungsteam IS 'Members of the Degree Program Development Team';
COMMENT ON TABLE bis.tbl_gemeinde IS 'Key-Table of Local Community';
COMMENT ON TABLE bis.tbl_gsprogramm IS 'Joint Degree Programs';
COMMENT ON TABLE bis.tbl_gsprogrammtyp IS 'Joint Degree Programs';
COMMENT ON TABLE bis.tbl_gsstudientyp IS 'Joint Degree Programs';
COMMENT ON TABLE bis.tbl_hauptberuf IS 'Key-Table of Main Job';
COMMENT ON TABLE bis.tbl_lgartcode IS 'Key-Table of Program Types';
COMMENT ON TABLE bis.tbl_mobilitaet IS 'Joint Degree Programs of Students';
COMMENT ON TABLE bis.tbl_mobilitaetsprogramm IS 'Key-Table of Mobility Programs';
COMMENT ON TABLE bis.tbl_mobilitaetstyp IS 'Key-Table of Type of international activity';
COMMENT ON TABLE bis.tbl_nation IS 'Key-Table of Nations';
COMMENT ON TABLE bis.tbl_orgform IS 'Key-Table of Organisation Forms of Degree Programs';
COMMENT ON TABLE bis.tbl_verwendung IS 'Key-Table of Employee Functions';
COMMENT ON TABLE bis.tbl_zgv IS 'Key-Table of Requirements Bachelor';
COMMENT ON TABLE bis.tbl_zgvdoktor IS 'Key-Table of Requirements Doktor';
COMMENT ON TABLE bis.tbl_zgvgruppe IS 'Aliqoute Reduction Groups';
COMMENT ON TABLE bis.tbl_zgvgruppe_zuordnung IS 'Aliqoute Reduction Groups';
COMMENT ON TABLE bis.tbl_zgvmaster IS 'Key-Table of Requirements Master';
COMMENT ON TABLE bis.tbl_zweck IS 'Key-Table of Purpose of Semester Abroad';
COMMENT ON TABLE campus.tbl_abgabe IS 'Uploads to Kreuzerltool';
COMMENT ON TABLE campus.tbl_anwesenheit IS 'Student Attendance';
COMMENT ON TABLE campus.tbl_beispiel IS 'Kreuzerltool Entries';
COMMENT ON TABLE campus.tbl_benutzerlvstudiensemester IS 'Subscriptions to Elective Courses';
COMMENT ON TABLE campus.tbl_content IS 'Content Pages';
COMMENT ON TABLE campus.tbl_contentchild IS 'Building the Content Tree';
COMMENT ON TABLE campus.tbl_contentgruppe IS 'Content Permissions';
COMMENT ON TABLE campus.tbl_contentlog IS 'Locking Log of Content Pages';
COMMENT ON TABLE campus.tbl_contentsprache IS 'CMS Content in Different Languages';
COMMENT ON TABLE campus.tbl_coodle IS 'Appointment Surveys';
COMMENT ON TABLE campus.tbl_coodle_ressource IS 'Ressources Assigned to a Survey';
COMMENT ON TABLE campus.tbl_coodle_ressource_termin IS 'Selected Time Slots of a Survey';
COMMENT ON TABLE campus.tbl_coodle_status IS 'Key Table of State of the Survey';
COMMENT ON TABLE campus.tbl_coodle_termin IS 'Time Slots of a Survey';
COMMENT ON TABLE campus.tbl_dms IS 'List of CMS Documents';
COMMENT ON TABLE campus.tbl_dms_kategorie IS 'Document Categories';
COMMENT ON TABLE campus.tbl_dms_kategorie_gruppe IS 'Restrict Access to Document Categories';
COMMENT ON TABLE campus.tbl_dms_version IS 'Versions of Documents';
COMMENT ON TABLE campus.tbl_erreichbarkeit IS 'Key Table of Reachability in Case of Absence';
COMMENT ON TABLE campus.tbl_feedback IS 'DEPRECATED';
COMMENT ON TABLE campus.tbl_freebusy IS 'List of FreeBusy Calenders of a Person';
COMMENT ON TABLE campus.tbl_freebusytyp IS 'Key Table of Supported FreeBusy Urls';
COMMENT ON TABLE campus.tbl_infoscreen IS 'List of Aavailable Information Monitors';
COMMENT ON TABLE campus.tbl_infoscreen_content IS 'Content of Information Monitors';
COMMENT ON TABLE campus.tbl_legesamtnote IS 'Lehreinheit Grades';
COMMENT ON TABLE campus.tbl_lehre_tools IS 'Additional Course Tools';
COMMENT ON TABLE campus.tbl_lehre_tools_organisationseinheit IS 'Connects Courses of a Organisationunit to Tools';
COMMENT ON TABLE campus.tbl_lehrveranstaltung_pruefung IS 'Connects Multiple Courses with one Exam';
COMMENT ON TABLE campus.tbl_lvgesamtnote IS 'Course Grades Lector';
COMMENT ON TABLE campus.tbl_lvinfo IS 'DEPRECATED';
COMMENT ON TABLE campus.tbl_news IS 'studiengang_kz=0 and Semester=NULL -> global News
studiengang_kz=0 and Semester=0 -> Elective Course News
studiengang_kz=0 and Semester>0 -> News for selected Semester in all Degree Programs
studiengang_kz>0 and (Semester=NULL or Semester=0) -> all Semesters in Degree Program
studiengang_kz>0 and Semester>0 -> News for selected Semester in Degree Program';
COMMENT ON TABLE campus.tbl_notenschluessel IS 'Kreuzerltool Grading Scheme';
COMMENT ON TABLE campus.tbl_notenschluesseluebung IS 'Kreuzerltool Grading Scheme';
COMMENT ON TABLE campus.tbl_paabgabe IS 'Project Submissions';
COMMENT ON TABLE campus.tbl_paabgabetyp IS 'Key Table of Types of Submissions';
COMMENT ON TABLE campus.tbl_pruefung IS 'Exams';
COMMENT ON TABLE campus.tbl_pruefungsanmeldung IS 'Subscriptions to Exams';
COMMENT ON TABLE campus.tbl_pruefungsfenster IS 'Definition Exam Weeks';
COMMENT ON TABLE campus.tbl_pruefungsstatus IS 'Key Table of Exam Status';
COMMENT ON TABLE campus.tbl_pruefungstermin IS 'Exam Time Slots';
COMMENT ON TABLE campus.tbl_reservierung IS 'Room Reservation';
COMMENT ON TABLE campus.tbl_resturlaub IS 'DEPRECATED';
COMMENT ON TABLE campus.tbl_studentbeispiel IS 'Selected Entry in Kreuzerltool';
COMMENT ON TABLE campus.tbl_studentuebung IS 'Exercise Grades in Kreuzerltool';
COMMENT ON TABLE campus.tbl_template IS 'Templates for CMS Pages';
COMMENT ON TABLE campus.tbl_uebung IS 'Exercises in Kreuzerltool';
COMMENT ON TABLE campus.tbl_veranstaltung IS 'Events';
COMMENT ON TABLE campus.tbl_veranstaltungskategorie IS 'Event Categories';
COMMENT ON TABLE campus.tbl_zeitaufzeichnung IS 'Time Sheets of Employees';
COMMENT ON TABLE campus.tbl_zeitsperre IS 'Absences of Employees';
COMMENT ON TABLE campus.tbl_zeitsperretyp IS 'Type of Absences';
COMMENT ON TABLE campus.tbl_zeitwunsch IS 'Teaching Time Preferences';
COMMENT ON TABLE lehre.tbl_abschlussbeurteilung IS 'Key Table of Final Exam Grades';
COMMENT ON TABLE lehre.tbl_abschlusspruefung IS 'Final Exam';
COMMENT ON TABLE lehre.tbl_akadgrad IS 'Academic Title Assigned by Degree Program';
COMMENT ON TABLE lehre.tbl_anrechnung IS 'Course Crediting';
COMMENT ON TABLE lehre.tbl_anrechnung_begruendung IS 'Course Crediting Reasons';
COMMENT ON TABLE lehre.tbl_betreuerart IS 'Key Table of Type of Project Supervisor';
COMMENT ON TABLE lehre.tbl_ferien IS 'Holidays';
COMMENT ON TABLE lehre.tbl_lehreinheit IS 'Course Parts';
COMMENT ON TABLE lehre.tbl_lehreinheitgruppe IS 'Groups Assigned to Course';
COMMENT ON TABLE lehre.tbl_lehreinheitmitarbeiter IS 'Lectures Assigned to Course';
COMMENT ON TABLE lehre.tbl_lehrfach IS 'DEPRECATED';
COMMENT ON TABLE lehre.tbl_lehrform IS 'Key Table of Teached Course Types';
COMMENT ON TABLE lehre.tbl_lehrfunktion IS 'Key Table of Lector Functions in a Course';
COMMENT ON TABLE lehre.tbl_lehrmittel IS 'DEPRECATED';
COMMENT ON TABLE lehre.tbl_lehrtyp IS 'Key Table of Course Types';
COMMENT ON TABLE lehre.tbl_lehrveranstaltung IS 'Courses, Modules';
COMMENT ON TABLE lehre.tbl_lehrveranstaltung_kompatibel IS 'Course Compatibility';
COMMENT ON TABLE lehre.tbl_lvangebot IS 'Offered Course Times';
COMMENT ON TABLE lehre.tbl_lvregel IS 'Course Attendance Rules';
COMMENT ON TABLE lehre.tbl_lvregeltyp IS 'Key Table of Course Rule Types';
COMMENT ON TABLE lehre.tbl_moodle IS 'DEPRECATED';
COMMENT ON TABLE lehre.tbl_moodle_version IS 'DEPRECATED';
COMMENT ON TABLE lehre.tbl_note IS 'Key Table of Grades';
COMMENT ON TABLE lehre.tbl_notenschluessel IS 'Course Grading Scheme';
COMMENT ON TABLE lehre.tbl_notenschluesselaufteilung IS 'Course Grading Scheme Details';
COMMENT ON TABLE lehre.tbl_notenschluesselzuordnung IS 'Connection Between Grading Scheme and Course/Degree Program';
COMMENT ON TABLE lehre.tbl_projektarbeit IS 'Projects';
COMMENT ON TABLE lehre.tbl_projektbetreuer IS 'Project Supervisor';
COMMENT ON TABLE lehre.tbl_projekttyp IS 'Key Table of Project Type';
COMMENT ON TABLE lehre.tbl_pruefung IS 'Exams';
COMMENT ON TABLE lehre.tbl_pruefungstyp IS 'Key Table of Type of Exams';
COMMENT ON TABLE lehre.tbl_studienordnung IS 'Additional Information for Degree Programs and Study Regulations';
COMMENT ON TABLE lehre.tbl_studienordnung_semester IS 'DEPRECATED';
COMMENT ON TABLE lehre.tbl_studienordnungstatus IS 'Key Table of Study Regulation Status';
COMMENT ON TABLE lehre.tbl_studienplan IS 'Study Plan';
COMMENT ON TABLE lehre.tbl_studienplan_lehrveranstaltung IS 'Connects Courses with a Study Plan';
COMMENT ON TABLE lehre.tbl_studienplan_semester IS 'Valid Semesters of a Study Plan';
COMMENT ON TABLE lehre.tbl_studienplatz IS 'Defines the Maximum Study Places per Degree Program';
COMMENT ON TABLE lehre.tbl_stunde IS 'Time Grid of Schedule';
COMMENT ON TABLE lehre.tbl_stundenplan IS 'Schedule (Productive Data)';
COMMENT ON TABLE lehre.tbl_stundenplan_betriebsmittel IS 'Required Teaching Material';
COMMENT ON TABLE lehre.tbl_stundenplandev IS 'Schedule (Developing Data)';
COMMENT ON TABLE lehre.tbl_vertrag IS 'Teaching Contracts';
COMMENT ON TABLE lehre.tbl_vertrag_vertragsstatus IS 'Status History of Contracts';
COMMENT ON TABLE lehre.tbl_vertragsstatus IS 'Key Table of Contract Status';
COMMENT ON TABLE lehre.tbl_vertragstyp IS 'Key Table of Type of Contracts';
COMMENT ON TABLE lehre.tbl_zeitfenster IS 'DEPRECATED';
COMMENT ON TABLE lehre.tbl_zeugnis IS 'DEPRECATED';
COMMENT ON TABLE lehre.tbl_zeugnisnote IS 'Final Grades for Courses';
COMMENT ON TABLE system.tbl_app IS 'FH Complete Applications';
COMMENT ON TABLE system.tbl_appdaten IS 'App Specific Data';
COMMENT ON TABLE system.tbl_benutzerrolle IS 'Assigns Permissions and Roles to Users';
COMMENT ON TABLE system.tbl_berechtigung IS 'Key Table of Permissions';
COMMENT ON TABLE system.tbl_cronjob IS 'Automatic Cronjobs';
COMMENT ON TABLE system.tbl_extensions IS 'Table to Manage FH Complete Extensions';
COMMENT ON TABLE system.tbl_filters IS 'Table to Manage FH Complete Filters';
COMMENT ON TABLE system.tbl_log IS 'Person Log';
COMMENT ON TABLE system.tbl_logtype IS 'Key Table of Types of Log Entries';
COMMENT ON TABLE system.tbl_phrase IS 'Multi Language Phrases';
COMMENT ON TABLE system.tbl_phrasentext IS 'Multi Language Phrases Text';
COMMENT ON TABLE system.tbl_person_lock IS 'Persons that are locked for editing';
COMMENT ON TABLE system.tbl_rolle IS 'Permission Roles';
COMMENT ON TABLE system.tbl_rolleberechtigung IS 'Assigns Permissions to Roles';
COMMENT ON TABLE system.tbl_server IS 'List of Servers for Cronjobs';
COMMENT ON TABLE system.tbl_udf IS 'User Defined Fields';
COMMENT ON TABLE system.tbl_verarbeitungstaetigkeit IS 'Processing Activities';
COMMENT ON TABLE system.tbl_webservicelog IS 'Webservice Log';
COMMENT ON TABLE system.tbl_webservicerecht IS 'Webservice Permissions';
COMMENT ON TABLE system.tbl_webservicetyp IS 'Key Table of Webservice Types';
COMMENT ON TABLE fue.tbl_aktivitaet IS 'Timesheet SLA Activity';
COMMENT ON TABLE fue.tbl_aufwandstyp IS 'Estimation Scale Type';
COMMENT ON TABLE fue.tbl_projekt IS 'Projects';
COMMENT ON TABLE fue.tbl_projekt_dokument IS 'Assigns a DMS Document to a Project';
COMMENT ON TABLE fue.tbl_projekt_ressource IS 'Assigns a Ressource to a Project';
COMMENT ON TABLE fue.tbl_projektphase IS 'Project Phases';
COMMENT ON TABLE fue.tbl_projekttask IS 'Project Tasks';
COMMENT ON TABLE fue.tbl_ressource IS 'Project Ressources (Persons, Companys, Inventory)';
COMMENT ON TABLE fue.tbl_scrumsprint IS 'DEPRECATED';
COMMENT ON TABLE fue.tbl_scrumteam IS 'DEPRECATED';
COMMENT ON TABLE wawi.tbl_aufteilung IS 'DEPRECATED';
COMMENT ON TABLE wawi.tbl_aufteilung_default IS 'DEPRECATED';
COMMENT ON TABLE wawi.tbl_bestelldetail IS 'Order Details';
COMMENT ON TABLE wawi.tbl_bestelldetailtag IS 'Order Details Tags';
COMMENT ON TABLE wawi.tbl_bestellstatus IS 'Key Table of Order Status';
COMMENT ON TABLE wawi.tbl_bestellung IS 'Orders';
COMMENT ON TABLE wawi.tbl_bestellung_bestellstatus IS 'Order Status History';
COMMENT ON TABLE wawi.tbl_bestellungtag IS 'Order Tags';
COMMENT ON TABLE wawi.tbl_betriebsmittel IS 'Inventory';
COMMENT ON TABLE wawi.tbl_betriebsmittel_betriebsmittelstatus IS 'Inventory Status History';
COMMENT ON TABLE wawi.tbl_betriebsmittelperson IS 'Assigns Inventory to a Person';
COMMENT ON TABLE wawi.tbl_betriebsmittelstatus IS 'Key Table of Inventory Status';
COMMENT ON TABLE wawi.tbl_betriebsmitteltyp IS 'Key Table of Inventory Type';
COMMENT ON TABLE wawi.tbl_buchung IS 'Accounting of Lecturers (Addon-Abrechnung)';
COMMENT ON TABLE wawi.tbl_buchungstyp IS 'Key Table of Booking Types';
COMMENT ON TABLE wawi.tbl_budget IS 'Budget per Cost Unit';
COMMENT ON TABLE wawi.tbl_konto IS 'Accounts';
COMMENT ON TABLE wawi.tbl_konto_kostenstelle IS 'Connects Multiple Accounts with a Cost Unit';
COMMENT ON TABLE wawi.tbl_kostenstelle IS 'Cost Units';
COMMENT ON TABLE wawi.tbl_projekt_bestellung IS 'Assigns Orders to a Project';
COMMENT ON TABLE wawi.tbl_rechnung IS 'Invoice';
COMMENT ON TABLE wawi.tbl_rechnungsbetrag IS 'Invoice Amount';
COMMENT ON TABLE wawi.tbl_rechnungstyp IS 'Key Table of Invoice Types';
COMMENT ON TABLE wawi.tbl_zahlungstyp IS 'Key Table of Payment Types';
COMMENT ON TABLE testtool.tbl_ablauf IS 'List of Sections per Degree Program';
COMMENT ON TABLE testtool.tbl_ablauf_vorgaben IS 'Additional Test Configuration';
COMMENT ON TABLE testtool.tbl_antwort IS 'Answers of the Candidate';
COMMENT ON TABLE testtool.tbl_frage IS 'List of Questions';
COMMENT ON TABLE testtool.tbl_frage_sprache IS 'Questions in Different Languages';
COMMENT ON TABLE testtool.tbl_gebiet IS 'List of Test Sections';
COMMENT ON TABLE testtool.tbl_kategorie IS 'DEPRECATED';
COMMENT ON TABLE testtool.tbl_kriterien IS 'DEPRECATED';
COMMENT ON TABLE testtool.tbl_pruefling IS 'List of Tested Candidates';
COMMENT ON TABLE testtool.tbl_pruefling_frage IS 'Questions Given to a Candidate';
COMMENT ON TABLE testtool.tbl_vorschlag IS 'Available Answers to a Question';
COMMENT ON TABLE testtool.tbl_vorschlag_sprache IS 'Answers in Different Languages';
COMMENT ON SCHEMA addon IS 'Extensions and Addons';
COMMENT ON SCHEMA bis IS 'Key Table of and Additional Tables for Ministery Report';
COMMENT ON SCHEMA campus IS 'Campus Management and CIS';
COMMENT ON SCHEMA fue IS 'Projectmanagement';
COMMENT ON SCHEMA lehre IS 'Teaching and Learning';
COMMENT ON SCHEMA public IS 'Base Data';
COMMENT ON SCHEMA reports IS 'Cachingtables for Reporting';
COMMENT ON SCHEMA sync IS 'Synchronisation Data';
COMMENT ON SCHEMA system IS 'Permissions, Logging';
COMMENT ON SCHEMA testtool IS 'Placement Test';
COMMENT ON SCHEMA wawi IS 'Inventory, Orders';
COMMENT ON COLUMN public.tbl_prestudent.rt_punkte1 IS 'DEPRECATED';
COMMENT ON COLUMN public.tbl_prestudent.rt_punkte2 IS 'DEPRECATED';
COMMENT ON COLUMN public.tbl_prestudent.rt_punkte3 IS 'DEPRECATED';
COMMENT ON COLUMN public.tbl_prestudent.anmeldungreihungstest IS 'DEPRECATED';
COMMENT ON COLUMN public.tbl_prestudent.reihungstest_id IS 'DEPRECATED';
COMMENT ON COLUMN public.tbl_prestudent.ausstellungsstaat IS 'DEPRECATED';
COMMENT ON COLUMN public.tbl_prestudent.aufnahmeschluessel IS 'DEPRECATED';
COMMENT ON COLUMN lehre.tbl_lehrveranstaltung.old_lehrfach_id IS 'DEPRECATED';
";
if(!$db->db_query($qry))
echo '<strong>Comments: '.$db->db_last_error().'</strong><br>';
else
echo 'Kommentare fuer DB Datenbanktabellen hinzugefügt';
}
}
}
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -1555,6 +1933,7 @@ $tabellen=array(
"system.tbl_webservicetyp" => array("webservicetyp_kurzbz","beschreibung"),
"system.tbl_server" => array("server_kurzbz","beschreibung"),
"system.tbl_udf" => array("schema", "table", "jsons"),
"system.tbl_person_lock" => array("lock_id", "person_id", "uid", "zeitpunkt", "app"),
"wawi.tbl_betriebsmittelperson" => array("betriebsmittelperson_id","betriebsmittel_id","person_id", "anmerkung", "kaution", "ausgegebenam", "retouram","insertamum", "insertvon","updateamum", "updatevon","ext_id","uid"),
"wawi.tbl_betriebsmittel" => array("betriebsmittel_id","betriebsmitteltyp","oe_kurzbz", "ort_kurzbz", "beschreibung", "nummer", "hersteller","seriennummer", "bestellung_id","bestelldetail_id", "afa","verwendung","anmerkung","reservieren","updateamum","updatevon","insertamum","insertvon","ext_id","inventarnummer","leasing_bis","inventuramum","inventurvon","anschaffungsdatum","anschaffungswert","hoehe","breite","tiefe","nummer2","verplanen"),
"wawi.tbl_betriebsmittel_betriebsmittelstatus" => array("betriebsmittelbetriebsmittelstatus_id","betriebsmittel_id","betriebsmittelstatus_kurzbz", "datum", "updateamum", "updatevon", "insertamum", "insertvon","anmerkung"),