ido-pgsql: Change timestamp columns to timestamp without time zone

refs #13221
This commit is contained in:
Eric Lippmann 2016-11-17 12:36:57 +01:00 committed by Michael Friedrich
parent 0b0107ad04
commit aadfedc3d4
1 changed files with 81 additions and 81 deletions

View File

@ -54,7 +54,7 @@ $$ LANGUAGE plpgsql;
CREATE TABLE icinga_acknowledgements (
acknowledgement_id bigserial,
instance_id bigint default 0,
entry_time timestamp with time zone default '1970-01-01 00:00:00+00',
entry_time timestamp,
entry_time_usec INTEGER default 0,
acknowledgement_type INTEGER default 0,
object_id bigint default 0,
@ -64,7 +64,7 @@ CREATE TABLE icinga_acknowledgements (
is_sticky INTEGER default 0,
persistent_comment INTEGER default 0,
notify_contacts INTEGER default 0,
end_time timestamp with time zone default '1970-01-01 00:00:00+00',
end_time timestamp,
CONSTRAINT PK_acknowledgement_id PRIMARY KEY (acknowledgement_id)
) ;
@ -94,20 +94,20 @@ CREATE TABLE icinga_commands (
CREATE TABLE icinga_commenthistory (
commenthistory_id bigserial,
instance_id bigint default 0,
entry_time timestamp with time zone default '1970-01-01 00:00:00+00',
entry_time timestamp,
entry_time_usec INTEGER default 0,
comment_type INTEGER default 0,
entry_type INTEGER default 0,
object_id bigint default 0,
comment_time timestamp with time zone default '1970-01-01 00:00:00+00',
comment_time timestamp,
internal_comment_id bigint default 0,
author_name TEXT default '',
comment_data TEXT default '',
is_persistent INTEGER default 0,
comment_source INTEGER default 0,
expires INTEGER default 0,
expiration_time timestamp with time zone default '1970-01-01 00:00:00+00',
deletion_time timestamp with time zone default '1970-01-01 00:00:00+00',
expiration_time timestamp,
deletion_time timestamp,
deletion_time_usec INTEGER default 0,
name TEXT default NULL,
CONSTRAINT PK_commenthistory_id PRIMARY KEY (commenthistory_id) ,
@ -123,19 +123,19 @@ CREATE TABLE icinga_commenthistory (
CREATE TABLE icinga_comments (
comment_id bigserial,
instance_id bigint default 0,
entry_time timestamp with time zone default '1970-01-01 00:00:00+00',
entry_time timestamp,
entry_time_usec INTEGER default 0,
comment_type INTEGER default 0,
entry_type INTEGER default 0,
object_id bigint default 0,
comment_time timestamp with time zone default '1970-01-01 00:00:00+00',
comment_time timestamp,
internal_comment_id bigint default 0,
author_name TEXT default '',
comment_data TEXT default '',
is_persistent INTEGER default 0,
comment_source INTEGER default 0,
expires INTEGER default 0,
expiration_time timestamp with time zone default '1970-01-01 00:00:00+00',
expiration_time timestamp,
name TEXT default NULL,
session_token INTEGER default NULL,
CONSTRAINT PK_comment_id PRIMARY KEY (comment_id) ,
@ -186,11 +186,11 @@ CREATE TABLE icinga_conninfo (
disposition TEXT default '',
connect_source TEXT default '',
connect_type TEXT default '',
connect_time timestamp with time zone default '1970-01-01 00:00:00+00',
disconnect_time timestamp with time zone default '1970-01-01 00:00:00+00',
last_checkin_time timestamp with time zone default '1970-01-01 00:00:00+00',
data_start_time timestamp with time zone default '1970-01-01 00:00:00+00',
data_end_time timestamp with time zone default '1970-01-01 00:00:00+00',
connect_time timestamp,
disconnect_time timestamp,
last_checkin_time timestamp,
data_start_time timestamp,
data_end_time timestamp,
bytes_processed bigint default 0,
lines_processed bigint default 0,
entries_processed bigint default 0,
@ -239,9 +239,9 @@ CREATE TABLE icinga_contactnotificationmethods (
contactnotificationmethod_id bigserial,
instance_id bigint default 0,
contactnotification_id bigint default 0,
start_time timestamp with time zone default '1970-01-01 00:00:00+00',
start_time timestamp,
start_time_usec INTEGER default 0,
end_time timestamp with time zone default '1970-01-01 00:00:00+00',
end_time timestamp,
end_time_usec INTEGER default 0,
command_object_id bigint default 0,
command_args TEXT default '',
@ -260,9 +260,9 @@ CREATE TABLE icinga_contactnotifications (
instance_id bigint default 0,
notification_id bigint default 0,
contact_object_id bigint default 0,
start_time timestamp with time zone default '1970-01-01 00:00:00+00',
start_time timestamp,
start_time_usec INTEGER default 0,
end_time timestamp with time zone default '1970-01-01 00:00:00+00',
end_time timestamp,
end_time_usec INTEGER default 0,
CONSTRAINT PK_contactnotification_id PRIMARY KEY (contactnotification_id) ,
CONSTRAINT UQ_contactnotifications UNIQUE (instance_id,contact_object_id,start_time,start_time_usec)
@ -313,11 +313,11 @@ CREATE TABLE icinga_contactstatus (
contactstatus_id bigserial,
instance_id bigint default 0,
contact_object_id bigint default 0,
status_update_time timestamp with time zone default '1970-01-01 00:00:00+00',
status_update_time timestamp,
host_notifications_enabled INTEGER default 0,
service_notifications_enabled INTEGER default 0,
last_host_notification timestamp with time zone default '1970-01-01 00:00:00+00',
last_service_notification timestamp with time zone default '1970-01-01 00:00:00+00',
last_host_notification timestamp,
last_service_notification timestamp,
modified_attributes INTEGER default 0,
modified_host_attributes INTEGER default 0,
modified_service_attributes INTEGER default 0,
@ -389,7 +389,7 @@ CREATE TABLE icinga_customvariablestatus (
customvariablestatus_id bigserial,
instance_id bigint default 0,
object_id bigint default 0,
status_update_time timestamp with time zone default '1970-01-01 00:00:00+00',
status_update_time timestamp,
has_been_modified INTEGER default 0,
varname TEXT default '',
varvalue TEXT default '',
@ -411,8 +411,8 @@ CREATE TABLE icinga_dbversion (
dbversion_id bigserial,
name TEXT default '',
version TEXT default '',
create_time timestamp with time zone default '1970-01-01 00:00:00+00',
modify_time timestamp with time zone default '1970-01-01 00:00:00+00',
create_time timestamp,
modify_time timestamp,
CONSTRAINT PK_dbversion_id PRIMARY KEY (dbversion_id) ,
CONSTRAINT UQ_dbversion UNIQUE (name)
) ;
@ -428,23 +428,23 @@ CREATE TABLE icinga_downtimehistory (
instance_id bigint default 0,
downtime_type INTEGER default 0,
object_id bigint default 0,
entry_time timestamp with time zone default '1970-01-01 00:00:00+00',
entry_time timestamp,
author_name TEXT default '',
comment_data TEXT default '',
internal_downtime_id bigint default 0,
triggered_by_id bigint default 0,
is_fixed INTEGER default 0,
duration BIGINT default 0,
scheduled_start_time timestamp with time zone default '1970-01-01 00:00:00+00',
scheduled_end_time timestamp with time zone default '1970-01-01 00:00:00+00',
scheduled_start_time timestamp,
scheduled_end_time timestamp,
was_started INTEGER default 0,
actual_start_time timestamp with time zone default '1970-01-01 00:00:00+00',
actual_start_time timestamp,
actual_start_time_usec INTEGER default 0,
actual_end_time timestamp with time zone default '1970-01-01 00:00:00+00',
actual_end_time timestamp,
actual_end_time_usec INTEGER default 0,
was_cancelled INTEGER default 0,
is_in_effect INTEGER default 0,
trigger_time timestamp with time zone default '1970-01-01 00:00:00+00',
trigger_time timestamp,
name TEXT default NULL,
CONSTRAINT PK_downtimehistory_id PRIMARY KEY (downtimehistory_id) ,
CONSTRAINT UQ_downtimehistory UNIQUE (instance_id,object_id,entry_time,internal_downtime_id)
@ -463,9 +463,9 @@ CREATE TABLE icinga_eventhandlers (
object_id bigint default 0,
state INTEGER default 0,
state_type INTEGER default 0,
start_time timestamp with time zone default '1970-01-01 00:00:00+00',
start_time timestamp,
start_time_usec INTEGER default 0,
end_time timestamp with time zone default '1970-01-01 00:00:00+00',
end_time timestamp,
end_time_usec INTEGER default 0,
command_object_id bigint default 0,
command_args TEXT default '',
@ -489,7 +489,7 @@ CREATE TABLE icinga_eventhandlers (
CREATE TABLE icinga_externalcommands (
externalcommand_id bigserial,
instance_id bigint default 0,
entry_time timestamp with time zone default '1970-01-01 00:00:00+00',
entry_time timestamp,
command_type INTEGER default 0,
command_name TEXT default '',
command_args TEXT default '',
@ -505,7 +505,7 @@ CREATE TABLE icinga_externalcommands (
CREATE TABLE icinga_flappinghistory (
flappinghistory_id bigserial,
instance_id bigint default 0,
event_time timestamp with time zone default '1970-01-01 00:00:00+00',
event_time timestamp,
event_time_usec INTEGER default 0,
event_type INTEGER default 0,
reason_type INTEGER default 0,
@ -514,7 +514,7 @@ CREATE TABLE icinga_flappinghistory (
percent_state_change double precision default 0,
low_threshold double precision default 0,
high_threshold double precision default 0,
comment_time timestamp with time zone default '1970-01-01 00:00:00+00',
comment_time timestamp,
internal_comment_id bigint default 0,
CONSTRAINT PK_flappinghistory_id PRIMARY KEY (flappinghistory_id)
) ;
@ -535,9 +535,9 @@ CREATE TABLE icinga_hostchecks (
max_check_attempts INTEGER default 0,
state INTEGER default 0,
state_type INTEGER default 0,
start_time timestamp with time zone default '1970-01-01 00:00:00+00',
start_time timestamp,
start_time_usec INTEGER default 0,
end_time timestamp with time zone default '1970-01-01 00:00:00+00',
end_time timestamp,
end_time_usec INTEGER default 0,
command_object_id bigint default 0,
command_args TEXT default '',
@ -743,7 +743,7 @@ CREATE TABLE icinga_hoststatus (
hoststatus_id bigserial,
instance_id bigint default 0,
host_object_id bigint default 0,
status_update_time timestamp with time zone default '1970-01-01 00:00:00+00',
status_update_time timestamp,
output TEXT default '',
long_output TEXT default '',
perfdata TEXT default '',
@ -753,18 +753,18 @@ CREATE TABLE icinga_hoststatus (
should_be_scheduled INTEGER default 0,
current_check_attempt INTEGER default 0,
max_check_attempts INTEGER default 0,
last_check timestamp with time zone default '1970-01-01 00:00:00+00',
next_check timestamp with time zone default '1970-01-01 00:00:00+00',
last_check timestamp,
next_check timestamp,
check_type INTEGER default 0,
last_state_change timestamp with time zone default '1970-01-01 00:00:00+00',
last_hard_state_change timestamp with time zone default '1970-01-01 00:00:00+00',
last_state_change timestamp,
last_hard_state_change timestamp,
last_hard_state INTEGER default 0,
last_time_up timestamp with time zone default '1970-01-01 00:00:00+00',
last_time_down timestamp with time zone default '1970-01-01 00:00:00+00',
last_time_unreachable timestamp with time zone default '1970-01-01 00:00:00+00',
last_time_up timestamp,
last_time_down timestamp,
last_time_unreachable timestamp,
state_type INTEGER default 0,
last_notification timestamp with time zone default '1970-01-01 00:00:00+00',
next_notification timestamp with time zone default '1970-01-01 00:00:00+00',
last_notification timestamp,
next_notification timestamp,
no_more_notifications INTEGER default 0,
notifications_enabled INTEGER default 0,
problem_has_been_acknowledged INTEGER default 0,
@ -858,8 +858,8 @@ CREATE TABLE icinga_instances (
CREATE TABLE icinga_logentries (
logentry_id bigserial,
instance_id bigint default 0,
logentry_time timestamp with time zone default '1970-01-01 00:00:00+00',
entry_time timestamp with time zone default '1970-01-01 00:00:00+00',
logentry_time timestamp,
entry_time timestamp,
entry_time_usec INTEGER default 0,
logentry_type INTEGER default 0,
logentry_data TEXT default '',
@ -881,9 +881,9 @@ CREATE TABLE icinga_notifications (
notification_type INTEGER default 0,
notification_reason INTEGER default 0,
object_id bigint default 0,
start_time timestamp with time zone default '1970-01-01 00:00:00+00',
start_time timestamp,
start_time_usec INTEGER default 0,
end_time timestamp with time zone default '1970-01-01 00:00:00+00',
end_time timestamp,
end_time_usec INTEGER default 0,
state INTEGER default 0,
output TEXT default '',
@ -922,7 +922,7 @@ CREATE TABLE icinga_processevents (
processevent_id bigserial,
instance_id bigint default 0,
event_type INTEGER default 0,
event_time timestamp with time zone default '1970-01-01 00:00:00+00',
event_time timestamp,
event_time_usec INTEGER default 0,
process_id bigint default 0,
program_name TEXT default '',
@ -941,17 +941,17 @@ CREATE TABLE icinga_programstatus (
programstatus_id bigserial,
instance_id bigint default 0,
program_version TEXT default NULL,
status_update_time timestamp with time zone default '1970-01-01 00:00:00+00',
program_start_time timestamp with time zone default '1970-01-01 00:00:00+00',
program_end_time timestamp with time zone default '1970-01-01 00:00:00+00',
status_update_time timestamp,
program_start_time timestamp,
program_end_time timestamp,
is_currently_running INTEGER default 0,
endpoint_name TEXT default '',
process_id bigint default 0,
daemon_mode INTEGER default 0,
last_command_check timestamp with time zone default '1970-01-01 00:00:00+00',
last_log_rotation timestamp with time zone default '1970-01-01 00:00:00+00',
last_command_check timestamp,
last_log_rotation timestamp,
notifications_enabled INTEGER default 0,
disable_notif_expire_time timestamp with time zone default '1970-01-01 00:00:00+00',
disable_notif_expire_time timestamp,
active_service_checks_enabled INTEGER default 0,
passive_service_checks_enabled INTEGER default 0,
active_host_checks_enabled INTEGER default 0,
@ -996,20 +996,20 @@ CREATE TABLE icinga_scheduleddowntime (
instance_id bigint default 0,
downtime_type INTEGER default 0,
object_id bigint default 0,
entry_time timestamp with time zone default '1970-01-01 00:00:00+00',
entry_time timestamp,
author_name TEXT default '',
comment_data TEXT default '',
internal_downtime_id bigint default 0,
triggered_by_id bigint default 0,
is_fixed INTEGER default 0,
duration BIGINT default 0,
scheduled_start_time timestamp with time zone default '1970-01-01 00:00:00+00',
scheduled_end_time timestamp with time zone default '1970-01-01 00:00:00+00',
scheduled_start_time timestamp,
scheduled_end_time timestamp,
was_started INTEGER default 0,
actual_start_time timestamp with time zone default '1970-01-01 00:00:00+00',
actual_start_time timestamp,
actual_start_time_usec INTEGER default 0,
is_in_effect INTEGER default 0,
trigger_time timestamp with time zone default '1970-01-01 00:00:00+00',
trigger_time timestamp,
name TEXT default NULL,
session_token INTEGER default NULL,
CONSTRAINT PK_scheduleddowntime_id PRIMARY KEY (scheduleddowntime_id) ,
@ -1031,9 +1031,9 @@ CREATE TABLE icinga_servicechecks (
max_check_attempts INTEGER default 0,
state INTEGER default 0,
state_type INTEGER default 0,
start_time timestamp with time zone default '1970-01-01 00:00:00+00',
start_time timestamp,
start_time_usec INTEGER default 0,
end_time timestamp with time zone default '1970-01-01 00:00:00+00',
end_time timestamp,
end_time_usec INTEGER default 0,
command_object_id bigint default 0,
command_args TEXT default '',
@ -1234,7 +1234,7 @@ CREATE TABLE icinga_servicestatus (
servicestatus_id bigserial,
instance_id bigint default 0,
service_object_id bigint default 0,
status_update_time timestamp with time zone default '1970-01-01 00:00:00+00',
status_update_time timestamp,
output TEXT default '',
long_output TEXT default '',
perfdata TEXT default '',
@ -1244,19 +1244,19 @@ CREATE TABLE icinga_servicestatus (
should_be_scheduled INTEGER default 0,
current_check_attempt INTEGER default 0,
max_check_attempts INTEGER default 0,
last_check timestamp with time zone default '1970-01-01 00:00:00+00',
next_check timestamp with time zone default '1970-01-01 00:00:00+00',
last_check timestamp,
next_check timestamp,
check_type INTEGER default 0,
last_state_change timestamp with time zone default '1970-01-01 00:00:00+00',
last_hard_state_change timestamp with time zone default '1970-01-01 00:00:00+00',
last_state_change timestamp,
last_hard_state_change timestamp,
last_hard_state INTEGER default 0,
last_time_ok timestamp with time zone default '1970-01-01 00:00:00+00',
last_time_warning timestamp with time zone default '1970-01-01 00:00:00+00',
last_time_unknown timestamp with time zone default '1970-01-01 00:00:00+00',
last_time_critical timestamp with time zone default '1970-01-01 00:00:00+00',
last_time_ok timestamp,
last_time_warning timestamp,
last_time_unknown timestamp,
last_time_critical timestamp,
state_type INTEGER default 0,
last_notification timestamp with time zone default '1970-01-01 00:00:00+00',
next_notification timestamp with time zone default '1970-01-01 00:00:00+00',
last_notification timestamp,
next_notification timestamp,
no_more_notifications INTEGER default 0,
notifications_enabled INTEGER default 0,
problem_has_been_acknowledged INTEGER default 0,
@ -1323,7 +1323,7 @@ CREATE TABLE icinga_service_contacts (
CREATE TABLE icinga_statehistory (
statehistory_id bigserial,
instance_id bigint default 0,
state_time timestamp with time zone default '1970-01-01 00:00:00+00',
state_time timestamp,
state_time_usec INTEGER default 0,
object_id bigint default 0,
state_change INTEGER default 0,
@ -1348,9 +1348,9 @@ CREATE TABLE icinga_statehistory (
CREATE TABLE icinga_systemcommands (
systemcommand_id bigserial,
instance_id bigint default 0,
start_time timestamp with time zone default '1970-01-01 00:00:00+00',
start_time timestamp,
start_time_usec INTEGER default 0,
end_time timestamp with time zone default '1970-01-01 00:00:00+00',
end_time timestamp,
end_time_usec INTEGER default 0,
command_line TEXT default '',
timeout INTEGER default 0,
@ -1429,7 +1429,7 @@ CREATE TABLE icinga_endpointstatus (
instance_id bigint default 0,
endpoint_object_id bigint default 0,
zone_object_id bigint default 0,
status_update_time timestamp with time zone default '1970-01-01 00:00:00+00',
status_update_time timestamp,
identity text DEFAULT NULL,
node text DEFAULT NULL,
is_connected integer default 0,
@ -1464,7 +1464,7 @@ CREATE TABLE icinga_zonestatus (
instance_id bigint default 0,
zone_object_id bigint default 0,
parent_zone_object_id bigint default 0,
status_update_time timestamp with time zone default '1970-01-01 00:00:00+00',
status_update_time timestamp,
CONSTRAINT PK_zonestatus_id PRIMARY KEY (zonestatus_id) ,
CONSTRAINT UQ_zonestatus UNIQUE (zone_object_id)
) ;