summaryrefslogtreecommitdiffstats
path: root/schema/mysql-migrations/upgrade_110.sql
blob: 800f7ab1754723d7b6e5409a3abe3b6952cbfece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
UPDATE icinga_host_var
  SET varvalue = 'false',
       format = 'json'
  WHERE varvalue = 'n'
    AND varname IN (
      SELECT DISTINCT varname
        FROM director_datafield
       WHERE datatype LIKE '%DataTypeBoolean'
    );

UPDATE icinga_host_var
  SET varvalue = 'true',
       format = 'json'
  WHERE varvalue = 'y'
    AND varname IN (
      SELECT DISTINCT varname
        FROM director_datafield
       WHERE datatype LIKE '%DataTypeBoolean'
    );

UPDATE icinga_service_var
  SET varvalue = 'false',
       format = 'json'
  WHERE varvalue = 'n'
    AND varname IN (
      SELECT DISTINCT varname
        FROM director_datafield
       WHERE datatype LIKE '%DataTypeBoolean'
    );

UPDATE icinga_service_var
  SET varvalue = 'true',
       format = 'json'
  WHERE varvalue = 'y'
    AND varname IN (
      SELECT DISTINCT varname
        FROM director_datafield
       WHERE datatype LIKE '%DataTypeBoolean'
    );


UPDATE icinga_command_var
  SET varvalue = 'false',
       format = 'json'
  WHERE varvalue = 'n'
    AND varname IN (
      SELECT DISTINCT varname
        FROM director_datafield
       WHERE datatype LIKE '%DataTypeBoolean'
    );

UPDATE icinga_command_var
  SET varvalue = 'true',
       format = 'json'
  WHERE varvalue = 'y'
    AND varname IN (
      SELECT DISTINCT varname
        FROM director_datafield
       WHERE datatype LIKE '%DataTypeBoolean'
    );

UPDATE icinga_user_var
  SET varvalue = 'false',
       format = 'json'
  WHERE varvalue = 'n'
    AND varname IN (
      SELECT DISTINCT varname
        FROM director_datafield
       WHERE datatype LIKE '%DataTypeBoolean'
    );

UPDATE icinga_user_var
  SET varvalue = 'true',
       format = 'json'
  WHERE varvalue = 'y'
    AND varname IN (
      SELECT DISTINCT varname
        FROM director_datafield
       WHERE datatype LIKE '%DataTypeBoolean'
    );

UPDATE icinga_notification_var
  SET varvalue = 'false',
       format = 'json'
  WHERE varvalue = 'n'
    AND varname IN (
      SELECT DISTINCT varname
        FROM director_datafield
       WHERE datatype LIKE '%DataTypeBoolean'
    );

UPDATE icinga_notification_var
  SET varvalue = 'true',
       format = 'json'
  WHERE varvalue = 'y'
    AND varname IN (
      SELECT DISTINCT varname
        FROM director_datafield
       WHERE datatype LIKE '%DataTypeBoolean'
    );

INSERT INTO director_schema_migration
  (schema_version, migration_time)
  VALUES (110, NOW());