<?xml version="1.0" encoding="UTF-8"?>

<!-- Differential patch for M/Monit database schema version 21 to 22 -->

<patch>

<!-- sqlite -->

<statements type="sqlite">

<comment>Add origin to groupedhost table</comment>
<statement>
ALTER TABLE groupedhost ADD COLUMN origin INTEGER DEFAULT 0;
</statement>

<comment>Set origin of existing groupedhost entries to M/Monit</comment>
<statement>
UPDATE groupedhost SET origin=0;
</statement>

</statements>


<!-- mysql -->

<statements type="mysql">

<comment>Add origin to groupedhost table</comment>
<statement>
ALTER TABLE groupedhost ADD COLUMN origin INTEGER DEFAULT 0;
</statement>

<comment>Set origin of existing groupedhost entries to M/Monit</comment>
<statement>
UPDATE groupedhost SET origin=0;
</statement>

</statements>


<!-- postgresql -->

<statements type="postgresql">

<comment>Add origin to groupedhost table</comment>
<statement>
ALTER TABLE groupedhost ADD COLUMN origin INTEGER DEFAULT 0;
</statement>

<comment>Set origin of existing groupedhost entries to M/Monit</comment>
<statement>
UPDATE groupedhost SET origin=0;
</statement>

</statements>

</patch>

