mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 08:22:17 +00:00
add indexes for person_id to table msg_message and msg_recipient, ensure tabulator data request is made before requests of create msg components
This commit is contained in:
@@ -255,7 +255,7 @@ class Message_model extends DB_Model
|
||||
group by
|
||||
m.message_id, m.person_id, mr.person_id
|
||||
|
||||
union
|
||||
union all
|
||||
|
||||
select
|
||||
m.message_id, m.person_id as sender_id, mr.person_id as recipient_id
|
||||
|
||||
@@ -243,6 +243,7 @@ export default {
|
||||
title: this.$p.t('global', 'aktionen')
|
||||
});
|
||||
*/
|
||||
this.$emit('tabulator_tablebuilt');
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -56,6 +56,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tablebuilt: false,
|
||||
isVisibleDiv: false,
|
||||
messageId: null
|
||||
}
|
||||
@@ -139,8 +140,10 @@ export default {
|
||||
},
|
||||
resetMessageId(){
|
||||
this.messageId = null;
|
||||
},
|
||||
tableBuilt: function() {
|
||||
this.tablebuilt = true;
|
||||
}
|
||||
|
||||
},
|
||||
template: `
|
||||
<div class="core-messages h-100 pb-3">
|
||||
@@ -155,6 +158,7 @@ export default {
|
||||
</form>
|
||||
|
||||
<message-modal
|
||||
v-if="tablebuilt"
|
||||
ref="modalMsg"
|
||||
:type-id="typeId"
|
||||
:id="id"
|
||||
@@ -166,8 +170,9 @@ export default {
|
||||
</message-modal>
|
||||
|
||||
<!--in same page-->
|
||||
<div v-show="isVisibleDiv" class="overflow-auto m-3" style="max-height: 500px; border: 1px solid #ccc;">
|
||||
<div v-if="isVisibleDiv" class="overflow-auto m-3" style="max-height: 500px; border: 1px solid #ccc;">
|
||||
<form-only
|
||||
v-if="tablebuilt"
|
||||
ref="templateNewDivMessage"
|
||||
:type-id="typeId"
|
||||
:id="id"
|
||||
@@ -187,6 +192,7 @@ export default {
|
||||
:openMode="openMode"
|
||||
@newMessage="handleMessage"
|
||||
@replyToMessage="handleMessage"
|
||||
@tabulator_tablebuilt="tableBuilt"
|
||||
>
|
||||
</table-messages>
|
||||
</div>
|
||||
|
||||
@@ -91,6 +91,7 @@ require_once('dbupdate_3.4/69065_Projektarbeiten_Firmen_verwalten.php');
|
||||
require_once('dbupdate_3.4/68744_StV_settings.php');
|
||||
require_once('dbupdate_3.4/62889_reihungstest_ueberwachung_mit_constructor.php');
|
||||
require_once('dbupdate_3.4/71399_dashboard_update_widget_paths.php');
|
||||
require_once('dbupdate_3.4/71645_studvw_messagetab_ladezeit.php');
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_msg_message_person_id'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_msg_message_person_id ON public.tbl_msg_message USING btree (person_id)";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>idx_tbl_msg_message_person_id: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Index idx_tbl_msg_message_person_id angelegt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_msg_recipient_person_id'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_msg_recipient_person_id ON public.tbl_msg_recipient USING btree (person_id)";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>idx_tbl_msg_recipient_person_id: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Index idx_tbl_msg_recipient_person_id angelegt<br>';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user