incubator-alois-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fla...@apache.org
Subject svn commit: r1031127 [13/22] - in /incubator/alois/trunk: ./ bin/ debian/ doc/ etc/ etc/alois/ etc/alois/apache2/ etc/alois/environments/ etc/alois/prisma/ etc/cron.d/ etc/default/ etc/logrotate.d/ prisma/ prisma/bin/ prisma/conf/ prisma/conf/prisma/ p...
Date Thu, 04 Nov 2010 18:27:42 GMT
Added: incubator/alois/trunk/rails/db/migrate/001_initialize_database.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/001_initialize_database.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/001_initialize_database.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/001_initialize_database.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,491 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class InitializeDatabase < ActiveRecord::Migration
+  def self.up
+    
+    create_table "amavis_metas" do |t|
+      t.column "process_id", :integer
+      t.column "amavis_id", :string, :limit => 20
+      t.column "action", :string, :limit => 20
+      t.column "status", :string, :limit => 20
+      t.column "from_field", :string, :limit => 50
+      t.column "to_field", :string
+      t.column "message_id", :string, :limit => 50
+      t.column "hits", :string, :limit => 10
+      t.column "process_time", :integer
+      t.column "ip", :string, :limit => 50
+      t.column "signature", :string, :limit => 50
+      t.column "quarantine", :string, :limit => 50
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+    
+    add_index "amavis_metas", ["action"], :name => "amavis_metas_action_index"
+    add_index "amavis_metas", ["status"], :name => "amavis_metas_status_index"
+    add_index "amavis_metas", ["from_field"], :name => "amavis_metas_from_field_index"
+    add_index "amavis_metas", ["message_id"], :name => "amavis_metas_message_id_index"
+    add_index "amavis_metas", ["ip"], :name => "amavis_metas_ip_index"
+    add_index "amavis_metas", ["signature"], :name => "amavis_metas_signature_index"
+    add_index "amavis_metas", ["pure_metas_id"], :name => "amavis_metas_pure_metas_id_index"
+    add_index "amavis_metas", ["log_metas_id"], :name => "amavis_metas_log_metas_id_index"
+    
+    create_table "apache_file_metas" do |t|
+      t.column "virtual_host", :string, :limit => 100
+      t.column "file_metas_id", :integer
+    end
+    add_index "apache_file_metas", ["file_metas_id"], :name => "apache_file_metas_file_metas_id_index"
+    
+    create_table "apache_log_metas" do |t|
+      t.column "forensic_id", :string, :limit => 30
+      t.column "serve_time", :integer
+      t.column "host", :string, :limit => 50
+    end
+
+    create_table "apache_metas" do |t|
+      t.column "remote_host", :string, :limit => 40
+      t.column "remote_logname", :string, :limit => 20
+      t.column "remote_user", :string, :limit => 20
+      t.column "time", :time
+      t.column "date", :date
+      t.column "first_line", :string, :limit => 512
+      t.column "status", :integer
+      t.column "bytes", :integer
+      t.column "referer", :string, :limit => 40
+      t.column "useragent", :string, :limit => 40
+      t.column "log_metas_id", :integer
+      t.column "pure_metas_id", :integer
+    end
+
+    add_index "apache_metas", ["remote_host"], :name => "apache_metas_remote_host_index"
+    add_index "apache_metas", ["remote_user"], :name => "apache_metas_remote_user_index"
+    add_index "apache_metas", ["status"], :name => "apache_metas_status_index"
+    add_index "apache_metas", ["useragent"], :name => "apache_metas_useragent_index"
+    add_index "apache_metas", ["first_line"], :name => "apache_metas_first_line_index"
+    add_index "apache_metas", ["log_metas_id"], :name => "apache_metas_log_metas_id_index"
+    add_index "apache_metas", ["pure_metas_id"], :name => "apache_metas_pure_metas_id_index"
+
+    create_table "archive_metas" do |t|
+      t.column "filename", :string
+      t.column "current", :integer
+      t.column "total", :integer
+      t.column "todo", :integer
+      t.column "finished", :boolean, :default => false
+      t.column "created_at", :datetime
+      t.column "updated_at", :datetime
+    end
+
+    create_table "cisco_base_metas" do |t|
+      t.column "ip", :string, :limit => 40
+      t.column "message_type", :string, :limit => 10
+      t.column "severity", :integer
+      t.column "message_number", :integer
+      t.column "log_metas_id", :integer
+      t.column "syslogd_small_base_metas_id", :integer
+    end
+
+    add_index "cisco_base_metas", ["ip"], :name => "cisco_base_metas_ip_index"
+    add_index "cisco_base_metas", ["message_type"], :name => "cisco_base_metas_message_type_index"
+    add_index "cisco_base_metas", ["severity"], :name => "cisco_base_metas_severity_index"
+    add_index "cisco_base_metas", ["log_metas_id"], :name => "cisco_base_metas_log_metas_id_index"
+    add_index "cisco_base_metas", ["syslogd_small_base_metas_id"], :name => "cisco_base_metas_syslogd_small_base_metas_id_index"
+
+    create_table "cisco_firewall_connection_metas" do |t|
+      t.column "msg", :string, :limit => 30
+      t.column "reason", :string, :limit => 30
+      t.column "connection_id", :integer
+      t.column "connection_type", :string, :limit => 10
+      t.column "foreign_name", :string, :limit => 30
+      t.column "foreign_ip", :string, :limit => 40
+      t.column "foreign_port", :string, :limit => 10
+      t.column "local_name", :string, :limit => 30
+      t.column "local_ip", :string, :limit => 40
+      t.column "local_port", :string, :limit => 10
+      t.column "global_to_ip", :string, :limit => 40
+      t.column "global_to_port", :string, :limit => 10
+      t.column "global_from_ip", :string, :limit => 40
+      t.column "global_from_port", :string, :limit => 10
+      t.column "duration", :time
+      t.column "bytes", :integer
+      t.column "cisco_base_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+
+    add_index "cisco_firewall_connection_metas", ["connection_id"], :name => "cisco_firewall_connection_metas_connection_id_index"
+    add_index "cisco_firewall_connection_metas", ["connection_type"], :name => "cisco_firewall_connection_metas_connection_type_index"
+    add_index "cisco_firewall_connection_metas", ["reason"], :name => "cisco_firewall_connection_metas_reason_index"
+    add_index "cisco_firewall_connection_metas", ["foreign_name"], :name => "cisco_firewall_connection_metas_foreign_name_index"
+    add_index "cisco_firewall_connection_metas", ["foreign_ip"], :name => "cisco_firewall_connection_metas_foreign_ip_index"
+    add_index "cisco_firewall_connection_metas", ["foreign_port"], :name => "cisco_firewall_connection_metas_foreign_port_index"
+    add_index "cisco_firewall_connection_metas", ["local_name"], :name => "cisco_firewall_connection_metas_local_name_index"
+    add_index "cisco_firewall_connection_metas", ["local_ip"], :name => "cisco_firewall_connection_metas_local_ip_index"
+    add_index "cisco_firewall_connection_metas", ["local_port"], :name => "cisco_firewall_connection_metas_local_port_index"
+    add_index "cisco_firewall_connection_metas", ["global_to_ip"], :name => "cisco_firewall_connection_metas_global_to_ip_index"
+    add_index "cisco_firewall_connection_metas", ["global_to_port"], :name => "cisco_firewall_connection_metas_global_to_port_index"
+    add_index "cisco_firewall_connection_metas", ["global_from_ip"], :name => "cisco_firewall_connection_metas_global_from_ip_index"
+    add_index "cisco_firewall_connection_metas", ["global_from_port"], :name => "cisco_firewall_connection_metas_global_from_port_index"
+    add_index "cisco_firewall_connection_metas", ["cisco_base_metas_id"], :name => "cisco_firewall_connection_metas_cisco_base_metas_id_index"
+    add_index "cisco_firewall_connection_metas", ["log_metas_id"], :name => "cisco_firewall_connection_metas_log_metas_id_index"
+
+    create_table "cisco_firewall_metas" do |t|
+      t.column "msg", :string, :limit => 100
+      t.column "source", :string, :limit => 40
+      t.column "source_port", :string, :limit => 10
+      t.column "destination", :string, :limit => 40
+      t.column "destination_port", :string, :limit => 10
+      t.column "interface", :string, :limit => 20
+      t.column "cisco_base_metas_id", :integer
+    end
+
+    add_index "cisco_firewall_metas", ["source"], :name => "cisco_firewall_metas_source_index"
+    add_index "cisco_firewall_metas", ["source_port"], :name => "cisco_firewall_metas_source_port_index"
+    add_index "cisco_firewall_metas", ["destination"], :name => "cisco_firewall_metas_destination_index"
+    add_index "cisco_firewall_metas", ["destination_port"], :name => "cisco_firewall_metas_destination_port_index"
+    add_index "cisco_firewall_metas", ["interface"], :name => "cisco_firewall_metas_interface_index"
+    add_index "cisco_firewall_metas", ["cisco_base_metas_id"], :name => "cisco_firewall_metas_cisco_base_metas_id_index"
+
+
+    create_table "cisco_metas" do |t|
+      t.column "msg", :string, :limit => 100
+      t.column "server", :string, :limit => 40
+      t.column "server_port", :string, :limit => 10
+      t.column "name", :string, :limit => 40
+      t.column "ip", :string, :limit => 40
+      t.column "port", :string, :limit => 10
+      t.column "user", :string, :limit => 20
+      t.column "group_name", :string, :limit => 20
+      t.column "reason", :string, :limit => 100
+      t.column "cisco_base_metas_id", :integer
+    end
+
+    add_index "cisco_metas", ["msg"], :name => "cisco_metas_msg_index"
+    add_index "cisco_metas", ["server"], :name => "cisco_metas_server_index"
+    add_index "cisco_metas", ["server_port"], :name => "cisco_metas_server_port_index"
+    add_index "cisco_metas", ["name"], :name => "cisco_metas_name_index"
+    add_index "cisco_metas", ["ip"], :name => "cisco_metas_ip_index"
+    add_index "cisco_metas", ["port"], :name => "cisco_metas_port_index"
+    add_index "cisco_metas", ["user"], :name => "cisco_metas_user_index"
+    add_index "cisco_metas", ["group_name"], :name => "cisco_metas_group_name_index"
+    add_index "cisco_metas", ["cisco_base_metas_id"], :name => "cisco_metas_cisco_base_metas_id_index"
+
+    create_table "cron_metas" do |t|
+      t.column "process_id", :integer
+      t.column "user", :string, :limit => 20
+      t.column "uid", :integer
+      t.column "program", :string, :limit => 20
+      t.column "action", :string, :limit => 20
+      t.column "command", :string
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+
+    add_index "cron_metas", ["user"], :name => "cron_metas_user_index"
+    add_index "cron_metas", ["uid"], :name => "cron_metas_uid_index"
+    add_index "cron_metas", ["program"], :name => "cron_metas_program_index"
+    add_index "cron_metas", ["action"], :name => "cron_metas_action_index"
+    add_index "cron_metas", ["pure_metas_id"], :name => "cron_metas_pure_metas_id_index"
+    add_index "cron_metas", ["log_metas_id"], :name => "cron_metas_log_metas_id_index"
+
+    create_table "fetchmail_metas" do |t|
+      t.column "process_id", :integer
+      t.column "program", :string, :limit => 20
+      t.column "action", :string, :limit => 200
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+
+    add_index "fetchmail_metas", ["program"], :name => "fetchmail_metas_program_index"
+    add_index "fetchmail_metas", ["action"], :name => "fetchmail_metas_action_index"
+    add_index "fetchmail_metas", ["pure_metas_id"], :name => "fetchmail_metas_pure_metas_id_index"
+    add_index "fetchmail_metas", ["log_metas_id"], :name => "fetchmail_metas_log_metas_id_index"
+
+    create_table "file_metas" do |t|
+      t.column "dirname", :string
+      t.column "basename", :string
+      t.column "ftype", :string, :limit => 20
+      t.column "size", :integer
+      t.column "mtime", :datetime
+      t.column "atime", :datetime
+      t.column "ctime", :datetime
+      t.column "umask", :integer
+      t.column "uid", :integer
+      t.column "gid", :integer
+      t.column "created_at", :datetime
+      t.column "updated_at", :datetime
+      t.column "options", :string
+      t.column "source_db_metas_id", :integer
+      t.column "archive_metas_id", :integer
+    end
+    add_index "file_metas", ["source_db_metas_id"], :name => "file_metas_source_db_metas_id_index"
+    add_index "file_metas", ["archive_metas_id"], :name => "file_metas_archive_metas_id_index"
+
+    create_table "filters" do |t|
+      t.column "name", :string
+      t.column "order_by", :string
+      t.column "yaml_declaration", :text
+      t.column "description", :text
+    end
+
+    create_table "iptables_firewall_metas" do |t|
+      t.column "rule", :string, :limit => 10
+      t.column "src", :string, :limit => 20
+      t.column "spt", :string, :limit => 10
+      t.column "dst", :string, :limit => 20
+      t.column "dpt", :string, :limit => 10
+      t.column "custom", :string, :limit => 20
+      t.column "in", :string, :limit => 10
+      t.column "out", :string, :limit => 10
+      t.column "physin", :string, :limit => 10
+      t.column "physout", :string, :limit => 10
+      t.column "len", :integer
+      t.column "tos", :string, :limit => 10
+      t.column "prec", :string, :limit => 10
+      t.column "ttl", :integer
+      t.column "identifier", :integer
+      t.column "proto", :string, :limit => 10
+      t.column "additional", :string, :limit => 20
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+
+    add_index "iptables_firewall_metas", ["rule"], :name => "iptables_firewall_metas_rule_index"
+    add_index "iptables_firewall_metas", ["src"], :name => "iptables_firewall_metas_src_index"
+    add_index "iptables_firewall_metas", ["spt"], :name => "iptables_firewall_metas_spt_index"
+    add_index "iptables_firewall_metas", ["dst"], :name => "iptables_firewall_metas_dst_index"
+    add_index "iptables_firewall_metas", ["dpt"], :name => "iptables_firewall_metas_dpt_index"
+    add_index "iptables_firewall_metas", ["proto"], :name => "iptables_firewall_metas_proto_index"
+    add_index "iptables_firewall_metas", ["log_metas_id"], :name => "iptables_firewall_metas_log_metas_id_index"
+    add_index "iptables_firewall_metas", ["pure_metas_id"], :name => "iptables_firewall_metas_pure_metas_id_index"
+
+    create_table "log_metas" do |t|
+      t.column "date", :date
+      t.column "time", :time
+      t.column "host", :string
+      t.column "hash_value", :integer
+      t.column "syslogd_metas_id", :integer
+      t.column "pure_metas_id", :integer
+      t.column "file_metas_id", :integer
+    end
+    add_index "log_metas", ["syslogd_metas_id"], :name => "log_metas_syslogd_metas_id_index"
+    add_index "log_metas", ["pure_metas_id"], :name => "log_metas_pure_metas_id_index"
+    add_index "log_metas", ["file_metas_id"], :name => "log_metas_file_metas_id_index"
+
+    add_index "log_metas", ["date"], :name => "log_metas_date_index"
+    add_index "log_metas", ["host"], :name => "log_metas_host_index"
+    add_index "log_metas", ["hash_value"], :name => "log_metas_hash_value_index"
+
+    create_table "messages" do |t|
+      t.column "meta_id", :integer
+      t.column "msg", :binary
+      t.column "meta_type_name", :string, :limit => 100
+    end
+
+    add_index "messages", ["meta_id"], :name => "messages_meta_id_index"
+    add_index "messages", ["meta_type_name"], :name => "messages_meta_type_name_index"
+
+    create_table "metas" do |t|
+      t.column "parent_id", :integer
+      t.column "meta_type_name", :string, :limit => 100
+      t.column "meta_id", :integer
+    end
+
+    add_index "metas", ["parent_id"], :name => "metas_parent_id_index"
+    add_index "metas", ["meta_type_name"], :name => "metas_meta_type_name_index"
+    add_index "metas", ["meta_id"], :name => "metas_meta_id_index"
+
+    create_table "nagios_metas" do |t|
+      t.column "msg_type", :string, :limit => 50
+      t.column "probed_by_host", :string, :limit => 50
+      t.column "affected_host", :string, :limit => 50
+      t.column "service", :string, :limit => 20
+      t.column "status", :string, :limit => 20
+      t.column "unknown_1", :string, :limit => 20
+      t.column "unknown_2", :integer
+      t.column "output", :string
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+
+    add_index "nagios_metas", ["msg_type"], :name => "nagios_metas_msg_type_index"
+    add_index "nagios_metas", ["probed_by_host"], :name => "nagios_metas_probed_by_host_index"
+    add_index "nagios_metas", ["affected_host"], :name => "nagios_metas_affected_host_index"
+    add_index "nagios_metas", ["service"], :name => "nagios_metas_service_index"
+    add_index "nagios_metas", ["status"], :name => "nagios_metas_status_index"
+    add_index "nagios_metas", ["pure_metas_id"], :name => "nagios_metas_pure_metas_id_index"
+    add_index "nagios_metas", ["log_metas_id"], :name => "nagios_metas_log_metas_id_index"
+
+
+    create_table "nonyms" do |t|
+      t.column "real_name", :string, :limit => 20
+    end
+
+    add_index "nonyms", ["real_name"], :name => "nonyms_real_name_index"
+
+    create_table "ovpn_base_metas" do |t|
+      t.column "vpn", :string, :limit => 20
+      t.column "process_id", :integer
+      t.column "client_ip", :string, :limit => 50
+      t.column "client_port", :integer
+      t.column "cert", :string, :limit => 50
+      t.column "msg_type", :string, :limit => 50
+      t.column "msg", :string
+      t.column "client", :string, :limit => 20
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+
+    add_index "ovpn_base_metas", ["vpn"], :name => "ovpn_base_metas_vpn_index"
+    add_index "ovpn_base_metas", ["client_ip"], :name => "ovpn_base_metas_client_ip_index"
+    add_index "ovpn_base_metas", ["client_port"], :name => "ovpn_base_metas_client_port_index"
+    add_index "ovpn_base_metas", ["cert"], :name => "ovpn_base_metas_cert_index"
+    add_index "ovpn_base_metas", ["msg_type"], :name => "ovpn_base_metas_msg_type_index"
+    add_index "ovpn_base_metas", ["pure_metas_id"], :name => "ovpn_base_metas_pure_metas_id_index"
+    add_index "ovpn_base_metas", ["log_metas_id"], :name => "ovpn_base_metas_log_metas_id_index"
+
+    create_table "postfix_detail_metas" do |t|
+      t.column "message_id", :string, :limit => 50
+      t.column "from", :string, :limit => 50
+      t.column "to", :string, :limit => 50
+      t.column "orig_to", :string, :limit => 50
+      t.column "relay_host", :string, :limit => 50
+      t.column "relay_ip", :string, :limit => 50
+      t.column "delay", :integer
+      t.column "size", :integer
+      t.column "nrcpt", :integer
+      t.column "status", :string, :limit => 20
+      t.column "command", :string, :limit => 200
+      t.column "postfix_metas_id", :integer
+    end
+
+    add_index "postfix_detail_metas", ["relay_host"], :name => "postfix_detail_metas_relay_host_index"
+    add_index "postfix_detail_metas", ["relay_ip"], :name => "postfix_detail_metas_relay_ip_index"
+    add_index "postfix_detail_metas", ["delay"], :name => "postfix_detail_metas_delay_index"
+    add_index "postfix_detail_metas", ["status"], :name => "postfix_detail_metas_status_index"
+    add_index "postfix_detail_metas", ["postfix_metas_id"], :name => "postfix_detail_metas_postfix_metas_id_index"
+
+    create_table "postfix_metas" do |t|
+      t.column "program", :string, :limit => 10
+      t.column "process_id", :integer
+      t.column "mail_message_id", :string, :limit => 10
+      t.column "action", :string, :limit => 40
+      t.column "host", :string, :limit => 50
+      t.column "ip", :string, :limit => 50
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+
+    add_index "postfix_metas", ["program"], :name => "postfix_metas_program_index"
+    add_index "postfix_metas", ["action"], :name => "postfix_metas_action_index"
+    add_index "postfix_metas", ["mail_message_id"], :name => "postfix_metas_mail_message_id_index"
+    add_index "postfix_metas", ["host"], :name => "postfix_metas_host_index"
+    add_index "postfix_metas", ["ip"], :name => "postfix_metas_ip_index"
+    add_index "postfix_metas", ["pure_metas_id"], :name => "postfix_metas_pure_metas_id_index"
+    add_index "postfix_metas", ["log_metas_id"], :name => "postfix_metas_log_metas_id_index"
+
+    create_table "pure_metas" do |t|
+      t.column "file_metas_id", :integer
+    end
+    add_index "pure_metas", ["file_metas_id"], :name => "pure_metas_file_metas_id_index"
+
+    create_table "sentinels" do |t|
+      t.column "name", :string
+      t.column "description", :text
+      t.column "view_id", :integer
+      t.column "threshold", :integer
+      t.column "send_ossim", :boolean
+      t.column "send_mail", :boolean
+      t.column "mail_to", :text
+      t.column "external_program", :text
+      t.column "cron_interval", :text
+      t.column "enabled", :boolean
+    end
+
+    create_table "source_db_metas" do |t|
+      t.column "process_type", :string, :limit => 10
+      t.column "start", :integer
+      t.column "current", :integer
+      t.column "total", :integer
+      t.column "todo", :integer
+      t.column "count", :integer
+      t.column "raw_class_name", :string, :limit => 20
+      t.column "execute_once", :boolean
+      t.column "waiting_time", :integer
+      t.column "finished", :boolean, :default => false
+      t.column "created_at", :datetime
+      t.column "updated_at", :datetime
+    end
+
+    create_table "syslogd_metas" do |t|
+      t.column "ip", :string, :limit => 40
+      t.column "facility", :string, :limit => 10
+      t.column "priority", :string, :limit => 10
+      t.column "level", :string, :limit => 10
+      t.column "tag", :string, :limit => 10
+      t.column "program", :integer, :limit => 15
+      t.column "source_db_metas_id", :integer
+      t.column "archive_metas_id", :integer
+    end
+
+    add_index "syslogd_metas", ["ip"], :name => "syslogd_metas_ip_index"
+    add_index "syslogd_metas", ["program"], :name => "syslogd_metas_program_index"
+    add_index "syslogd_metas", ["source_db_metas_id"], :name => "syslogd_metas_source_db_metas_id_index"
+    add_index "syslogd_metas", ["archive_metas_id"], :name => "syslogd_metas_archive_metas_id_index"
+    
+    create_table "syslogd_small_base_metas" do |t|
+      t.column "date", :date
+      t.column "time", :time
+      t.column "level", :string, :limit => 10
+      t.column "ip", :string, :limit => 40
+      t.column "hash_value", :integer
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+
+    add_index "syslogd_small_base_metas", ["date"], :name => "syslogd_small_base_metas_date_index"
+    add_index "syslogd_small_base_metas", ["level"], :name => "syslogd_small_base_metas_level_index"
+    add_index "syslogd_small_base_metas", ["ip"], :name => "syslogd_small_base_metas_ip_index"
+    add_index "syslogd_small_base_metas", ["hash_value"], :name => "syslogd_small_base_metas_hash_value_index"
+    add_index "syslogd_small_base_metas", ["pure_metas_id"], :name => "syslogd_small_base_metas_pure_metas_id_index"
+    add_index "syslogd_small_base_metas", ["log_metas_id"], :name => "syslogd_small_base_metas_log_metas_id_index"
+
+    create_table "test_metas" do |t|
+      t.column "message", :string
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+    add_index "test_metas", ["log_metas_id"], :name => "test_metas_log_metas_id_index"
+    add_index "test_metas", ["pure_metas_id"], :name => "test_metas_pure_metas_id_index"
+
+    create_table "views" do |t|
+      t.column "name", :string
+      t.column "sql_declaration", :text
+      t.column "additional_fields", :text
+      t.column "date_column_name", :text
+      t.column "description", :text
+    end
+    
+  end
+
+  def self.down
+    raise IrreversibleMigration
+  end
+  
+end
+
+
+
+
+
+
+

Added: incubator/alois/trunk/rails/db/migrate/002_create_cisco_session_table.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/002_create_cisco_session_table.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/002_create_cisco_session_table.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/002_create_cisco_session_table.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,36 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateCiscoSessionTable < ActiveRecord::Migration
+
+  def self.up
+ ActiveRecord::Base.transaction do
+    create_table :cisco_session_metas do |t|
+      t.column :msg, :string, :limit => 100
+      t.column :session_type, :string, :limit => 30
+      t.column :duration, :time
+      t.column :in_bytes, :integer
+      t.column :out_bytes, :integer      
+      t.column :cisco_metas_id, :integer
+    end
+    add_index :cisco_session_metas, :msg
+    add_index :cisco_session_metas, :session_type       
+    add_index :cisco_session_metas, :cisco_metas_id    
+    end
+  end
+
+  def self.down
+    drop_table :cisco_session_metas
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/003_create_charts_table.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/003_create_charts_table.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/003_create_charts_table.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/003_create_charts_table.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,36 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateChartsTable < ActiveRecord::Migration
+  def self.up
+
+    create_table "charts" do |t|
+      t.column "name", :string
+      t.column "description", :string
+
+      t.column "column1", :string
+      t.column "column2", :string
+      t.column "aggregation_column", :string
+      t.column "aggregation_function", :string
+      t.column "chart_type", :string
+      t.column "order_by", :string
+    end
+
+  end
+
+  def self.down
+    drop_table "charts"
+  end
+
+end

Added: incubator/alois/trunk/rails/db/migrate/003_migrate_cisco_meta_msg_to_session.rb.disabled
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/003_migrate_cisco_meta_msg_to_session.rb.disabled?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/003_migrate_cisco_meta_msg_to_session.rb.disabled (added)
+++ incubator/alois/trunk/rails/db/migrate/003_migrate_cisco_meta_msg_to_session.rb.disabled Thu Nov  4 18:27:22 2010
@@ -0,0 +1,83 @@
+class MigrateCiscoMetaMsgToSession < ActiveRecord::Migration
+  class CiscoMeta < ActiveRecord::Base
+  end
+  class CicsoSessionMeta < ActiveRecord::Base
+  end
+
+  def self.up
+
+    CiscoMeta.find(:all, :conditions => "msg LIKE 'WebVPN session terminated: %' AND reason IS NULL").each { |m|
+      if m.msg =~ "WebVPN session terminated\: (.*)"
+	m.msg = nil
+	m.save
+
+	sm = CiscoSessionMeta.new
+	sm.session_type = "WebVPN"
+	sm.msg = "terminated"
+	sm.reason = $1
+	sm.cisco_metas_id = m.id
+	sm.save
+      else
+	throw "Error while transforming WebVPN session terminated"
+      end
+    }
+    throw "not all WebVPN session terminated records were transformed" if CiscoMeta.find(:all, :conditions => "msg LIKE 'WebVPN session terminated: %' AND reason IS NULL").count != 0 
+    
+    CiscoMeta.find(:all, :conditions => "msg LIKE 'Session disconnected. Session Type:%'").each { |m|
+      if m.msg =~ "Session disconnected. Session Type: ([^,]*), Duration: ([^,]*), Bytes xmt: ([^,]*), Bytes rcv: ([^,]*)$"
+	sm = CiscoSessionMeta.new
+	sm.session_type = $1
+	sm.duration = $2
+	sm.out_bytes = $3
+	sm.in_bytes = $4
+	sm.msg = "disconnected"
+	sm.reason = m.reason
+	sm.cisco_metas_id = m.id
+	sm.save
+
+	m.msg = nil
+	m.reason = nil
+	m.save
+      else
+	throw "Error while transforming WebVPN session terminated"
+      end
+
+    }
+
+    CiscoMeta.find(:all, :conditions => "msg = 'SSL session with client terminated.'").each { |m|
+      sm = CiscoSessionMeta.new
+      sm.session_type = "SSL"
+      sm.msg = "terminated"
+      sm.cisco_metas_id = m.id      
+      sm.reason = m.reason
+      sm.save
+      
+      m.msg = nil
+      m.reason = nil
+      m.save
+    } 
+    
+    CiscoMeta.find(:all, :conditions => "msg = 'Starting SSL handshake with client for TLSv1 session.'").each { |m|
+      sm = CiscoSessionMeta.new
+      sm.session_type = "TLSv1"
+      sm.msg = "Starting SSL handshake"
+      sm.cisco_metas_id = m.id      
+      sm.reason = m.reason
+      sm.save
+      
+      m.msg = nil
+      m.reason = nil
+      m.save
+    } 
+    
+    
+
+
+ 
+
+  end
+
+  def self.down
+    drop_table :test
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/004_add_table_windows_event_metas.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/004_add_table_windows_event_metas.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/004_add_table_windows_event_metas.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/004_add_table_windows_event_metas.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,57 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddTableWindowsEventMetas < ActiveRecord::Migration
+  def self.up
+    return if WindowsEventMeta.table_exists?
+    create_table "windows_event_metas" do |t|
+      t.column "log_name", :string, :limit => 30
+      t.column "field1", :integer
+      t.column "event_type", :string, :limit => 20
+      t.column "field3", :integer
+      t.column "date", :date
+      t.column "time", :time
+      t.column "event_id", :integer
+      t.column "source", :string, :limit => 30
+      t.column "user", :string
+      t.column "category", :string, :limit => 30
+      t.column "level", :string, :limit => 30
+      t.column "computer", :string
+      t.column "facility", :string, :limit => 30
+      t.column "data", :binary
+      t.column "field14", :integer
+      
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+    
+    add_index "windows_event_metas", ["log_name"], :name => "windows_event_metas_log_name_index"
+    add_index "windows_event_metas", ["event_type"], :name => "windows_event_metas_event_type_index"
+    add_index "windows_event_metas", ["date"], :name => "windows_event_metas_date_index"
+    add_index "windows_event_metas", ["user"], :name => "windows_event_metas_user_index"
+    add_index "windows_event_metas", ["source"], :name => "windows_event_metas_source_index"
+    add_index "windows_event_metas", ["category"], :name => "windows_event_metas_category_index"
+    add_index "windows_event_metas", ["level"], :name => "windows_event_metas_message_level_index"
+    add_index "windows_event_metas", ["computer"], :name => "windows_event_metas_computer_index"
+    add_index "windows_event_metas", ["facility"], :name => "windows_event_metas_facility_index"
+
+    add_index "windows_event_metas", ["pure_metas_id"], :name => "windows_event_metas_pure_metas_id_index"
+    add_index "windows_event_metas", ["log_metas_id"], :name => "windows_event_metas_log_metasid_index"
+  end
+
+  def self.down
+    drop_table "windows_event_metas"
+  end
+
+end

Added: incubator/alois/trunk/rails/db/migrate/004_remove_msg_from_cisco_metas.rb.disabled
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/004_remove_msg_from_cisco_metas.rb.disabled?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/004_remove_msg_from_cisco_metas.rb.disabled (added)
+++ incubator/alois/trunk/rails/db/migrate/004_remove_msg_from_cisco_metas.rb.disabled Thu Nov  4 18:27:22 2010
@@ -0,0 +1,30 @@
+class RemoveMsgFromCiscoMetas < ActiveRecord::Migration
+  class CiscoMeta < ActiveRecord::Base
+  end
+  class CicsoSessionMeta < ActiveRecord::Base
+  end
+
+  def self.up
+
+    CiscoMeta.find(:all, :conditions => "msg LIKE 'WebVPN session terminated: %' AND reason IS NULL").each { |m|
+      if m.msg =~ "WebVPN session terminated\: (.*)"
+	m.reason = $1
+	m.msg = nil
+	m.save
+
+	sm = CiscoSessionMeta.new
+	sm.session_type = "WebVPN"
+	sm.msg = "terminated"
+	sm.cisco_metas_id = m.id
+	sm.save
+      else
+	throw "Error while transforming WebVPN session terminated"
+      end
+    }
+    
+  end
+
+  def self.down
+    drop_table :test
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/005_add_table_ace_passcode_metas.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/005_add_table_ace_passcode_metas.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/005_add_table_ace_passcode_metas.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/005_add_table_ace_passcode_metas.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,49 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddTableAcePasscodeMetas< ActiveRecord::Migration
+  def self.up
+    return if AcePasscodeMeta.table_exists?
+
+    create_table "ace_passcode_metas" do |t|
+      t.column "action", :string, :limit => 40
+      t.column "login", :string, :limit => 30
+      t.column "user_name", :string, :limit => 100
+      t.column "token", :string, :limit => 15
+      t.column "group_name", :string, :limit => 100
+      t.column "site", :string, :limit => 100
+      t.column "agent_host", :string, :limit => 100
+      t.column "server", :string, :limit => 100
+      
+      t.column "windows_event_metas_id", :integer
+      t.column "log_metas_id", :integer
+    end
+    
+    add_index "ace_passcode_metas", ["action"], :name => "ace_passcode_metas_action_index"
+    add_index "ace_passcode_metas", ["login"], :name => "ace_passcode_metas_login_index"
+    add_index "ace_passcode_metas", ["user_name"], :name => "ace_passcode_metas_user_name_index"
+    add_index "ace_passcode_metas", ["group_name"], :name => "ace_passcode_metas_group_index"
+    add_index "ace_passcode_metas", ["site"], :name => "ace_passcode_metas_site_index"
+    add_index "ace_passcode_metas", ["agent_host"], :name => "ace_passcode_metas_agent_host_index"
+    add_index "ace_passcode_metas", ["server"], :name => "ace_passcode_metas_server_index"
+
+    add_index "ace_passcode_metas", ["windows_event_metas_id"], :name => "ace_passcode_metas_windows_event_metas_id_index"
+    add_index "ace_passcode_metas", ["log_metas_id"], :name => "ace_passcode_metas_log_metas_id_index"
+  end
+
+  def self.down
+    drop_table "ace_passcode_metas"
+  end
+
+end

Added: incubator/alois/trunk/rails/db/migrate/006_add_exclusive_for_group_field_for_view_table.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/006_add_exclusive_for_group_field_for_view_table.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/006_add_exclusive_for_group_field_for_view_table.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/006_add_exclusive_for_group_field_for_view_table.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,24 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddExclusiveForGroupFieldForViewTable < ActiveRecord::Migration
+  def self.up
+    View.connection.add_column "views", "exclusive_for_group", :string
+  end
+
+  def self.down
+    View.connection.remove_column "views", "exclusive_for_group"
+  end
+end
+

Added: incubator/alois/trunk/rails/db/migrate/007_create_alarms.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/007_create_alarms.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/007_create_alarms.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/007_create_alarms.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,32 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateAlarms < ActiveRecord::Migration
+  def self.up
+    create_table :alarms do |t|
+      t.column :created_at, :datetime
+      t.column :sentinel_id, :integer
+      t.column :comment, :string
+      t.column :acknowledge, :boolean
+      t.column :updated_at, :datetime
+      t.column :updated_by, :string
+      t.column :data, :binary
+      t.column :log, :binary
+    end
+  end
+
+  def self.down
+    drop_table :alarms
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/008_create_bookmarks.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/008_create_bookmarks.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/008_create_bookmarks.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/008_create_bookmarks.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,32 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateBookmarks < ActiveRecord::Migration
+  def self.up
+    create_table :bookmarks do |t|
+      t.column :title, :string
+      t.column :description, :text
+      t.column :table_name, :string
+      t.column :mode, :string
+      t.column :controller, :string
+      t.column :action, :string
+      t.column :identifier, :integer
+      t.column :created_on, :date
+    end
+  end
+
+  def self.down
+    drop_table :bookmarks
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/009_add_chart_columns.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/009_add_chart_columns.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/009_add_chart_columns.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/009_add_chart_columns.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,27 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddChartColumns < ActiveRecord::Migration
+  def self.up
+    c = Chart.connection
+    c.add_column "charts", "height", :integer
+    c.add_column "charts", "width", :integer    
+  end
+
+  def self.down
+    c = Chart.connection
+    c.delete_column "charts", "height"
+    c.delete_column "charts", "width"
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/010_create_inet_header_metas.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/010_create_inet_header_metas.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/010_create_inet_header_metas.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/010_create_inet_header_metas.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,55 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateInetHeaderMetas < ActiveRecord::Migration
+  def self.up
+    create_table :inet_header_metas do |t|
+      t.column "date", :date
+      t.column "time", :time
+      t.column "milliseconds", :integer
+      t.column "severity", :string, :limit => 10
+      t.column "system_id", :string, :limit => 30
+      t.column "msg_id", :string, :limit => 30
+      t.column "user_id", :string, :limit => 30
+      t.column "eventtype", :string, :limit => 30
+      t.column "pure_metas_id", :integer
+      t.column "log_metas_id", :integer
+      t.column "client_ip", :string, :limit => 32
+      t.column "server_ip", :string, :limit => 32
+      t.column "session_id", :string,  :limit => 32
+      t.column "hit_number", :integer
+      t.column "num_object_hits", :integer
+      t.column "text1", :string, :limit => 1024
+      t.column "text2", :string, :limit => 1024
+    end
+
+    add_index "inet_header_metas", ["date"]
+    add_index "inet_header_metas", ["severity"]
+    add_index "inet_header_metas", ["system_id"]
+    add_index "inet_header_metas", ["msg_id"]
+    add_index "inet_header_metas", ["user_id"]
+    add_index "inet_header_metas", ["eventtype"]
+    add_index "inet_header_metas", ["pure_metas_id"]
+    add_index "inet_header_metas", ["log_metas_id"]
+    add_index "inet_header_metas", ["client_ip"]
+    add_index "inet_header_metas", ["server_ip"]
+    add_index "inet_header_metas", ["session_id"]
+    add_index "inet_header_metas", ["hit_number"]
+    add_index "inet_header_metas", ["num_object_hits"]
+  end
+
+  def self.down
+    drop_table :inet_header_metas
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/011_create_inet_object_metas.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/011_create_inet_object_metas.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/011_create_inet_object_metas.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/011_create_inet_object_metas.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,41 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateInetObjectMetas < ActiveRecord::Migration
+  def self.up
+    create_table :inet_object_metas do |t|
+      t.column "objecttype", :string, :limit => 30
+      t.column "object_id", :string, :limit => 512
+      t.column "version", :string, :limit => 30
+      t.column "filename", :string, :limit => 256
+      t.column "description", :string, :limit => 256
+      t.column "object_hashes", :string, :limit => 256
+      t.column "object_url", :string, :limit => 512      
+      t.column "inet_header_metas_id", :integer
+      t.column "inet_object_metas_id", :integer
+    end
+    add_index "inet_object_metas", ["objecttype"]
+    add_index "inet_object_metas", ["object_id"]
+    add_index "inet_object_metas", ["version"]
+    add_index "inet_object_metas", ["filename"]
+    add_index "inet_object_metas", ["object_hashes"]
+    add_index "inet_object_metas", ["object_url"]
+    add_index "inet_object_metas", ["inet_header_metas_id"]
+    add_index "inet_object_metas", ["inet_object_metas_id"]
+  end
+
+  def self.down
+    drop_table :inet_object_metas
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/012_add_id_source_to_views.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/012_add_id_source_to_views.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/012_add_id_source_to_views.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/012_add_id_source_to_views.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,23 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddIdSourceToViews < ActiveRecord::Migration
+  def self.up
+    View.connection.add_column "views", "id_source_table", :string
+  end
+
+  def self.down
+    View.connection.remove_column "views", "id_source_table"
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/013_create_report_templates.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/013_create_report_templates.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/013_create_report_templates.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/013_create_report_templates.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,34 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateReportTemplates < ActiveRecord::Migration
+  def self.up
+    create_table :report_templates do |t|
+      t.column :name, :string
+      t.column :description, :string
+      t.column :title, :string
+      t.column :text, :text
+      t.column :view_id, :integer
+      t.column :version, :integer
+      t.column :created_on, :date
+      t.column :created_at, :time
+      t.column :modified_on, :date
+      t.column :modified_at, :time
+    end
+  end
+
+  def self.down
+    drop_table :report_templates
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/014_create_charts_report_templates.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/014_create_charts_report_templates.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/014_create_charts_report_templates.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/014_create_charts_report_templates.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,33 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateChartsReportTemplates < ActiveRecord::Migration
+  def self.up
+    create_table :charts_report_templates do |t|
+      t.column :priority, :integer
+      t.column :chart_id, :integer
+      t.column :report_template_id, :integer
+      t.column :view_id, :integer
+    end
+
+    add_index "charts_report_templates", ["chart_id"]
+    add_index "charts_report_templates", ["report_template_id"]
+    add_index "charts_report_templates", ["view_id"]
+
+  end
+
+  def self.down
+    drop_table :charts_report_templates
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/015_create_tables.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/015_create_tables.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/015_create_tables.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/015_create_tables.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,28 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateTables < ActiveRecord::Migration
+  def self.up
+    create_table :tables do |t|
+      t.column :name, :string
+      t.column :description, :string
+      t.column :columns, :string
+      t.column :max_count, :integer
+    end
+  end
+
+  def self.down
+    drop_table :tables
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/016_create_tables_report_templates.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/016_create_tables_report_templates.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/016_create_tables_report_templates.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/016_create_tables_report_templates.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,33 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateTablesReportTemplates < ActiveRecord::Migration
+  def self.up
+    create_table :report_templates_tables do |t|
+      t.column :priority, :integer
+      t.column :table_id, :integer
+      t.column :report_template_id, :integer
+      t.column :view_id, :integer
+    end
+
+    add_index "report_templates_tables", ["table_id"]
+    add_index "report_templates_tables", ["report_template_id"]
+    add_index "report_templates_tables", ["view_id"]
+
+  end
+
+  def self.down
+    drop_table :report_templates_tables
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/017_create_reports.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/017_create_reports.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/017_create_reports.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/017_create_reports.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,37 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateReports < ActiveRecord::Migration
+  def self.up
+    create_table :reports do |t|
+      t.column :name, :string
+      t.column :date, :date
+      t.column :time, :time
+      t.column :path, :string
+      t.column :report_template_id, :integer
+      t.column :sentinel_id, :integer
+      t.column :generated_by, :string
+    end
+
+    add_index "reports", ["date"]
+    add_index "reports", ["name"]
+    add_index "reports", ["report_template_id"]
+    add_index "reports", ["sentinel_id"]
+    add_index "reports", ["generated_by"]
+  end
+
+  def self.down
+    drop_table :reports
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/018_move_alarm_data_to_disk.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/018_move_alarm_data_to_disk.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/018_move_alarm_data_to_disk.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/018_move_alarm_data_to_disk.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,45 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class MoveAlarmDataToDisk < ActiveRecord::Migration
+  def self.up
+    begin
+      Alarm.connection.add_column "alarms", "path", :string
+      
+      Alarm.find(:all).each {|alarm|
+	alarm.save_data(alarm["data"])
+      }
+      Alarm.connection.remove_column "alarms", "data"
+    rescue
+      Alarm.connection.remove_column "alarms", "path"
+      raise $!
+    end
+  end
+
+  def self.down
+    begin
+      Alarm.connection.add_column "alarms", "data", :binary
+      
+      Alarm.find(:all).each {|alarm|
+	alarm["data"] = alarm.text
+	alarm.save
+	Pathname.new(alarm.path).rmtree	
+      }
+      Alarm.connection.remove_column "alarms", "path"
+    rescue
+      Alarm.connection.remove_column "alarms", "data"
+      raise $!
+    end
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/019_add_alarm_id_to_report.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/019_add_alarm_id_to_report.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/019_add_alarm_id_to_report.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/019_add_alarm_id_to_report.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,25 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddAlarmIdToReport < ActiveRecord::Migration
+  def self.up
+    add_column "reports", "alarm_id", :integer
+    add_index "reports", ["alarm_id"]
+
+  end
+
+  def self.down
+    remove_column "reports", "alarm_id"
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/020_add_report_template_id_to_sentinel.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/020_add_report_template_id_to_sentinel.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/020_add_report_template_id_to_sentinel.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/020_add_report_template_id_to_sentinel.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,24 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddReportTemplateIdToSentinel < ActiveRecord::Migration
+  def self.up
+    add_column "sentinels","report_template_id",:integer
+    add_index "sentinels","report_template_id"
+  end
+
+  def self.down
+    remove_column "sentinels","report_template_id"
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/021_add_alarm_level_to_sentinel_and_alarm.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/021_add_alarm_level_to_sentinel_and_alarm.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/021_add_alarm_level_to_sentinel_and_alarm.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/021_add_alarm_level_to_sentinel_and_alarm.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,28 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddAlarmLevelToSentinelAndAlarm < ActiveRecord::Migration
+  def self.up
+    add_column "sentinels","alarm_level",:integer
+    add_index "sentinels","alarm_level"
+
+    add_column "alarms","alarm_level",:integer
+    add_index "alarms","alarm_level"
+  end
+
+  def self.down
+    remove_column "sentinels","alarm_level"
+    remove_column "alarms","alarm_level"
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/022_add_action_to_sentinel.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/022_add_action_to_sentinel.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/022_add_action_to_sentinel.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/022_add_action_to_sentinel.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,41 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddActionToSentinel < ActiveRecord::Migration
+  def self.up
+    add_column "sentinels","action",:integer
+    add_index "sentinels","action"
+
+    enabled = Sentinel::ACTIONS.invert[:alarm_and_report]
+    disabled = Sentinel::ACTIONS.invert[:disabled]
+    Sentinel.find(:all).each {|s|
+      s.action = (if s.enabled then enabled else disabled end)
+      s.save_without_validation
+    }
+    
+    remove_column "sentinels", "enabled"
+  end
+
+  def self.down
+    add_column "sentinels", "enabled", :boolean
+
+    disabled = Sentinel::ACTIONS.invert[:disabled]
+    Sentinel.find(:all).each {|s|
+      s.enabled =  (s.action != disabled)
+      s.save_without_validation
+    }
+    
+    remove_column "sentinels","action"
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/023_add_time_spans.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/023_add_time_spans.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/023_add_time_spans.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/023_add_time_spans.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,25 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddTimeSpans < ActiveRecord::Migration
+  def self.up
+    add_column "sentinels","time_range",:string, :default => "yesterday"
+    add_column "charts","time_range",:string, :default => "yesterday"    
+  end
+
+  def self.down
+    remove_column "sentinels","time_range"
+    remove_column "charts","time_range"
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/024_add_log_meta_id_to_apache_log_meta.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/024_add_log_meta_id_to_apache_log_meta.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/024_add_log_meta_id_to_apache_log_meta.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/024_add_log_meta_id_to_apache_log_meta.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,25 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddLogMetaIdToApacheLogMeta < ActiveRecord::Migration
+  def self.up
+    unless ApacheLogMeta.column_names.include?("log_metas_id")
+      add_column "apache_log_metas","log_metas_id",:integer
+      add_index "apache_log_metas","log_metas_id"
+    end
+  end
+
+  def self.down
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/025_remove_id_from_realtion_tables.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/025_remove_id_from_realtion_tables.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/025_remove_id_from_realtion_tables.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/025_remove_id_from_realtion_tables.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,25 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class RemoveIdFromRealtionTables < ActiveRecord::Migration
+
+  def self.up
+    remove_column "report_templates_tables","id"
+    remove_column "charts_report_templates","id"
+  end
+
+  def self.down
+    raise IrreversibleMigration    
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/026_create_compression_metas.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/026_create_compression_metas.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/026_create_compression_metas.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/026_create_compression_metas.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,29 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateCompressionMetas < ActiveRecord::Migration
+  def self.up
+    create_table :compression_metas do |t|
+      t.string :extname
+      t.string :inflate_command
+      t.integer :inflated_size
+      t.integer :deflated_size
+      t.integer :file_metas_id
+    end
+  end
+
+  def self.down
+    drop_table :compression_metas
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/027_add_compression_metas_id_to_pure_meta.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/027_add_compression_metas_id_to_pure_meta.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/027_add_compression_metas_id_to_pure_meta.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/027_add_compression_metas_id_to_pure_meta.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,24 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddCompressionMetasIdToPureMeta < ActiveRecord::Migration
+  def self.up
+    add_column "pure_metas", "compression_metas_id", :integer
+    add_index "pure_metas", "compression_metas_id"
+  end
+
+  def self.down
+    remove_column "pure_metas", "compression_metas_id"
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/028_add_do_not_use_view_to_view.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/028_add_do_not_use_view_to_view.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/028_add_do_not_use_view_to_view.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/028_add_do_not_use_view_to_view.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,24 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddDoNotUseViewToView < ActiveRecord::Migration
+  def self.up
+    add_column :views, :do_not_use_view_for_query, :boolean, :default => false
+  end
+
+  def self.down
+    remove_column :views, :do_not_use_view_for_query
+  end
+
+end

Added: incubator/alois/trunk/rails/db/migrate/029_create_squid_metas.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/029_create_squid_metas.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/029_create_squid_metas.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/029_create_squid_metas.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,59 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateSquidMetas < ActiveRecord::Migration
+  def self.up
+      create_table :squid_metas do |t|
+      t.integer :process_id
+      t.integer :seconds_since_epoch
+      t.integer :subsecond_time
+      t.integer :response_time_milliseconds
+      t.string :client_source_ip, :limit => 40
+      t.string :request_status, :limit => 30
+      t.integer :http_status_code
+      t.integer :reply_size
+      t.string :request_method, :limit => 10
+      t.text :request_url
+      t.string :user_name, :limit => 40
+      t.string :hierarchy_status, :limit => 30
+      t.string :client_fqdn, :limit => 50
+      t.string :mime_type, :limit => 60      
+      t.string :request_protocol, :limit => 10
+      t.string :request_host, :limit => 50
+      t.integer :pure_metas_id
+      t.integer :log_metas_id
+
+    end
+
+    add_index :squid_metas, :pure_metas_id
+    add_index :squid_metas, :log_metas_id
+    add_index :squid_metas, :process_id
+    add_index :squid_metas, :response_time_milliseconds
+    add_index :squid_metas, :client_source_ip
+    add_index :squid_metas, :request_status
+    add_index :squid_metas, :http_status_code
+    add_index :squid_metas, :reply_size
+    add_index :squid_metas, :request_method
+    add_index :squid_metas, :user_name
+    add_index :squid_metas, :mime_type
+    add_index :squid_metas, :hierarchy_status
+    add_index :squid_metas, :client_fqdn
+    add_index :squid_metas, :request_protocol
+    add_index :squid_metas, :request_host
+  end
+
+  def self.down
+    drop_table :squid_metas
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/030_update_chart_table.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/030_update_chart_table.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/030_update_chart_table.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/030_update_chart_table.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,46 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class UpdateChartTable < ActiveRecord::Migration
+  def self.up
+    add_column :charts, :column3, :string
+    add_column :charts, :max_values, :integer, :default => 45
+    add_column :charts, :stacked, :boolean, :default => false
+
+#    rename_column :charts, :aggregation_column, :aggregation
+#    Chart.find(:all).each {|chart|
+#      if (chart.aggregation_function or "").strip != ""
+#	chart.aggregation = "#{chart.aggregation_function}(#{chart.aggregation})"
+#	chart.save_without_validation
+#      end
+#    }
+#    remove_column :charts, :aggregation_function
+  end
+
+  def self.down
+    remove_column :charts, :column3
+    remove_column :charts, :max_values
+    remove_column :charts, :stacked
+
+#    add_column :charts, :aggregation_function, :string
+#    Chart.find(:all).each {|chart|
+#      if (chart.aggregation =~ /^\s*([^\)]+)\s*\(\s*([^\)]+)\s*\)$/)	
+#	chart.aggregation = $2
+#	chart.aggregation_function = $1
+#	chart.save_without_validation
+#      end
+#    }
+#    rename_column :charts, :aggregation, :aggregation_column
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/031_add_user_to_cisco_firewall_meta.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/031_add_user_to_cisco_firewall_meta.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/031_add_user_to_cisco_firewall_meta.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/031_add_user_to_cisco_firewall_meta.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,23 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddUserToCiscoFirewallMeta < ActiveRecord::Migration
+  def self.up
+    add_column "cisco_firewall_connection_metas", "user", :string, :limit => 20
+  end
+
+  def self.down
+    remove_column "cisco_firewall_connection_metas", "user"
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/032_add_filters_to_sentinel.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/032_add_filters_to_sentinel.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/032_add_filters_to_sentinel.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/032_add_filters_to_sentinel.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,23 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddFiltersToSentinel < ActiveRecord::Migration
+  def self.up
+    add_column "sentinels", "filters", :string
+  end
+
+  def self.down
+    remove_column "sentinels", "filters", :string
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/033_create_ip_ranges.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/033_create_ip_ranges.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/033_create_ip_ranges.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/033_create_ip_ranges.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,37 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class CreateIpRanges < ActiveRecord::Migration
+  def self.up
+    create_table :ip_ranges do |t|
+      t.string :name
+      t.text :description
+      t.string :from_ip
+      t.string :to_ip
+      t.string :netmask
+      t.boolean :enabled, :default => true
+    end
+
+    create_table :ip_ranges_mappings do |t|
+      t.integer :ip_range1_id
+      t.integer :ip_range2_id
+      t.text :description
+    end
+  end
+
+  def self.down
+    drop_table :ip_ranges
+    drop_table :ip_ranges_mappings
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/034_add_email_type_flags_to_sentinel.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/034_add_email_type_flags_to_sentinel.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/034_add_email_type_flags_to_sentinel.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/034_add_email_type_flags_to_sentinel.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,25 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddEmailTypeFlagsToSentinel < ActiveRecord::Migration
+  def self.up
+    add_column :sentinels, :include_report_in_email, :boolean, :default => true, :nil => false
+    add_column :sentinels, :include_csv_in_email, :boolean, :default => true, :nil => false
+  end
+
+  def self.down
+    remove_column :sentinels, :include_csv_in_email
+    remove_column :sentinels, :include_report_in_email
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/035_add_group_by_to_table.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/035_add_group_by_to_table.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/035_add_group_by_to_table.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/035_add_group_by_to_table.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,27 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddGroupByToTable < ActiveRecord::Migration
+  def self.up
+    add_column :tables, :group_by, :string
+    add_column :tables, :order_by, :string
+    add_column :tables, :max_display_count, :integer
+  end
+
+  def self.down
+    remove_column :tables, :group_by
+    remove_column :tables, :order_by, :string
+    remove_column :tables, :max_display_count
+  end
+end

Added: incubator/alois/trunk/rails/db/migrate/036_add_object_location_to_inet_object_meta.rb
URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/db/migrate/036_add_object_location_to_inet_object_meta.rb?rev=1031127&view=auto
==============================================================================
--- incubator/alois/trunk/rails/db/migrate/036_add_object_location_to_inet_object_meta.rb (added)
+++ incubator/alois/trunk/rails/db/migrate/036_add_object_location_to_inet_object_meta.rb Thu Nov  4 18:27:22 2010
@@ -0,0 +1,23 @@
+# Copyright 2010 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class AddObjectLocationToInetObjectMeta < ActiveRecord::Migration
+  def self.up
+    add_column "inet_object_metas","object_location",:string, :limit => 512
+  end
+
+  def self.down
+    remove_column "inet_object_metas","object_location"
+  end
+end



Mime
View raw message