CREATE TABLE watch (
        id INTEGER NOT NULL, 
        machine_id INTEGER NOT NULL, 
        created_user_id INTEGER, 
        modified_user_id INTEGER, 
        name VARCHAR(256) NOT NULL, 
        plugin VARCHAR(256) NOT NULL, 
        plugin_selector TEXT NOT NULL, 
        continuation_count INTEGER, 
        prohibition_period INTEGER, 
        warning_value TEXT, 
        is_warning_percentage BOOLEAN, 
        is_warning_script BOOLEAN, 
        warning_script TEXT, 
        is_warning_mail BOOLEAN, 
        warning_mail_body TEXT, 
        failure_value TEXT, 
        is_failure_percentage BOOLEAN, 
        is_failure_script BOOLEAN, 
        failure_script TEXT, 
        is_failure_mail BOOLEAN, 
        failure_mail_body TEXT, 
        is_okay_script BOOLEAN, 
        okay_script TEXT, 
        is_okay_mail BOOLEAN, 
        okay_mail_body TEXT, 
        notify_mail_to TEXT, 
        notify_mail_from TEXT, 
        karesansui_version VARCHAR(12) NOT NULL, 
        collectd_version VARCHAR(12) NOT NULL, 
        is_deleted BOOLEAN, 
        created TIMESTAMP, 
        modified TIMESTAMP, 
        PRIMARY KEY (id), 
         FOREIGN KEY(machine_id) REFERENCES machine (id), 
         FOREIGN KEY(created_user_id) REFERENCES user (id), 
         FOREIGN KEY(modified_user_id) REFERENCES user (id)
);

