aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortony <tony>2009-03-09 15:48:32 +0000
committertony <tony>2009-03-09 15:48:32 +0000
commit828f73e10cea0e6be417d977c4b5f7f10ceae9b1 (patch)
treeb08f263cab0320c063887946d0c968a9d155f7c2
parent0c2f263b6d3117fbb38740432284b31a0a474164 (diff)
Update models and schema for new table
-rw-r--r--app/models/censor_rule.rb4
-rw-r--r--app/models/comment.rb4
-rw-r--r--app/models/contact_validator.rb4
-rw-r--r--app/models/exim_log.rb4
-rw-r--r--app/models/exim_log_done.rb4
-rw-r--r--app/models/holiday.rb19
-rw-r--r--app/models/incoming_message.rb4
-rw-r--r--app/models/info_request.rb4
-rw-r--r--app/models/info_request_event.rb4
-rw-r--r--app/models/outgoing_message.rb4
-rw-r--r--app/models/post_redirect.rb4
-rw-r--r--app/models/public_body.rb4
-rw-r--r--app/models/public_body_tag.rb4
-rw-r--r--app/models/raw_email.rb4
-rw-r--r--app/models/track_thing.rb4
-rw-r--r--app/models/track_things_sent_email.rb4
-rw-r--r--app/models/user.rb4
-rw-r--r--app/models/user_info_request_sent_alert.rb4
-rw-r--r--db/schema.rb9
19 files changed, 61 insertions, 35 deletions
diff --git a/app/models/censor_rule.rb b/app/models/censor_rule.rb
index 1b00ea77f..de8c699a6 100644
--- a/app/models/censor_rule.rb
+++ b/app/models/censor_rule.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: censor_rules
#
@@ -21,7 +21,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: censor_rule.rb,v 1.8 2009-03-09 01:17:06 francis Exp $
+# $Id: censor_rule.rb,v 1.9 2009-03-09 15:48:32 tony Exp $
class CensorRule < ActiveRecord::Base
belongs_to :info_request
diff --git a/app/models/comment.rb b/app/models/comment.rb
index fcafaad24..ac270b68c 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: comments
#
@@ -19,7 +19,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: comment.rb,v 1.13 2009-03-09 01:17:06 francis Exp $
+# $Id: comment.rb,v 1.14 2009-03-09 15:48:32 tony Exp $
class Comment < ActiveRecord::Base
strip_attributes!
diff --git a/app/models/contact_validator.rb b/app/models/contact_validator.rb
index 487d0a107..1a97ba789 100644
--- a/app/models/contact_validator.rb
+++ b/app/models/contact_validator.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: contact_validators
#
@@ -15,7 +15,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: contact_validator.rb,v 1.28 2009-03-09 01:17:06 francis Exp $
+# $Id: contact_validator.rb,v 1.29 2009-03-09 15:48:32 tony Exp $
class ContactValidator < ActiveRecord::BaseWithoutTable
strip_attributes!
diff --git a/app/models/exim_log.rb b/app/models/exim_log.rb
index 7b91ff9c6..e5d5d6378 100644
--- a/app/models/exim_log.rb
+++ b/app/models/exim_log.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: exim_logs
#
@@ -18,7 +18,7 @@
# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: exim_log.rb,v 1.8 2009-03-09 12:46:05 francis Exp $
+# $Id: exim_log.rb,v 1.9 2009-03-09 15:48:32 tony Exp $
class EximLog < ActiveRecord::Base
belongs_to :info_request
diff --git a/app/models/exim_log_done.rb b/app/models/exim_log_done.rb
index 379df2a66..2f715a933 100644
--- a/app/models/exim_log_done.rb
+++ b/app/models/exim_log_done.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: exim_log_dones
#
@@ -16,7 +16,7 @@
# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: exim_log_done.rb,v 1.4 2009-03-09 01:17:06 francis Exp $
+# $Id: exim_log_done.rb,v 1.5 2009-03-09 15:48:32 tony Exp $
class EximLogDone < ActiveRecord::Base
has_many :exim_logs
diff --git a/app/models/holiday.rb b/app/models/holiday.rb
index de261bbc9..478e0b086 100644
--- a/app/models/holiday.rb
+++ b/app/models/holiday.rb
@@ -1,2 +1,21 @@
+# == Schema Information
+# Schema version: 74
+#
+# Table name: holidays
+#
+# id :integer not null, primary key
+# day :date
+# description :text
+#
+
+# models/holiday.rb:
+# Store details on public holidays on which the clock for answering FOI
+# requests do not run
+#
+# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
+# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
+#
+# $Id: holiday.rb,v 1.2 2009-03-09 15:48:32 tony Exp $
+
class Holiday < ActiveRecord::Base
end
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 20c7a89e1..7a68d4cb0 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: incoming_messages
#
@@ -19,7 +19,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: incoming_message.rb,v 1.191 2009-03-09 01:17:06 francis Exp $
+# $Id: incoming_message.rb,v 1.192 2009-03-09 15:48:32 tony Exp $
# TODO
# Move some of the (e.g. quoting) functions here into rblib, as they feel
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 4cb948cb4..69e7a8408 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: info_requests
#
@@ -23,7 +23,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: info_request.rb,v 1.174 2009-03-09 15:05:13 tony Exp $
+# $Id: info_request.rb,v 1.175 2009-03-09 15:48:32 tony Exp $
require 'digest/sha1'
require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian')
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb
index 7b86f13c1..ef8bff164 100644
--- a/app/models/info_request_event.rb
+++ b/app/models/info_request_event.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: info_request_events
#
@@ -21,7 +21,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: info_request_event.rb,v 1.76 2009-03-09 01:17:06 francis Exp $
+# $Id: info_request_event.rb,v 1.77 2009-03-09 15:48:32 tony Exp $
class InfoRequestEvent < ActiveRecord::Base
belongs_to :info_request
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb
index 1a6f3d688..223ff7731 100644
--- a/app/models/outgoing_message.rb
+++ b/app/models/outgoing_message.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: outgoing_messages
#
@@ -22,7 +22,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: outgoing_message.rb,v 1.81 2009-03-09 01:17:06 francis Exp $
+# $Id: outgoing_message.rb,v 1.82 2009-03-09 15:48:32 tony Exp $
class OutgoingMessage < ActiveRecord::Base
strip_attributes!
diff --git a/app/models/post_redirect.rb b/app/models/post_redirect.rb
index 30ac31ce8..4309a2bea 100644
--- a/app/models/post_redirect.rb
+++ b/app/models/post_redirect.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: post_redirects
#
@@ -26,7 +26,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: post_redirect.rb,v 1.46 2009-03-09 01:17:06 francis Exp $
+# $Id: post_redirect.rb,v 1.47 2009-03-09 15:48:32 tony Exp $
require 'openssl' # for random bytes function
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index 40d4d491a..d64a2ab92 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: public_bodies
#
@@ -25,7 +25,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: public_body.rb,v 1.132 2009-03-09 01:17:06 francis Exp $
+# $Id: public_body.rb,v 1.133 2009-03-09 15:48:32 tony Exp $
require 'csv'
require 'set'
diff --git a/app/models/public_body_tag.rb b/app/models/public_body_tag.rb
index 658a5f594..20c70686c 100644
--- a/app/models/public_body_tag.rb
+++ b/app/models/public_body_tag.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: public_body_tags
#
@@ -15,7 +15,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: public_body_tag.rb,v 1.25 2009-03-09 01:17:06 francis Exp $
+# $Id: public_body_tag.rb,v 1.26 2009-03-09 15:48:32 tony Exp $
class PublicBodyTag < ActiveRecord::Base
strip_attributes!
diff --git a/app/models/raw_email.rb b/app/models/raw_email.rb
index 489f7f3fb..1405bdf8d 100644
--- a/app/models/raw_email.rb
+++ b/app/models/raw_email.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: raw_emails
#
@@ -13,7 +13,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: raw_email.rb,v 1.8 2009-03-09 01:17:06 francis Exp $
+# $Id: raw_email.rb,v 1.9 2009-03-09 15:48:32 tony Exp $
class RawEmail < ActiveRecord::Base
# deliberately don't strip_attributes, so keeps raw email properly
diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb
index 614a5cfe6..464c58b60 100644
--- a/app/models/track_thing.rb
+++ b/app/models/track_thing.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: track_things
#
@@ -21,7 +21,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: track_thing.rb,v 1.49 2009-03-09 01:17:06 francis Exp $
+# $Id: track_thing.rb,v 1.50 2009-03-09 15:48:32 tony Exp $
class TrackThing < ActiveRecord::Base
belongs_to :tracking_user, :class_name => 'User'
diff --git a/app/models/track_things_sent_email.rb b/app/models/track_things_sent_email.rb
index c26331df7..c53e1c0e7 100644
--- a/app/models/track_things_sent_email.rb
+++ b/app/models/track_things_sent_email.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: track_things_sent_emails
#
@@ -18,7 +18,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: track_things_sent_email.rb,v 1.18 2009-03-09 01:17:06 francis Exp $
+# $Id: track_things_sent_email.rb,v 1.19 2009-03-09 15:48:32 tony Exp $
class TrackThingsSentEmail < ActiveRecord::Base
belongs_to :info_request_event
diff --git a/app/models/user.rb b/app/models/user.rb
index fed9de990..8ef0b7193 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: users
#
@@ -23,7 +23,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: user.rb,v 1.82 2009-03-09 01:17:06 francis Exp $
+# $Id: user.rb,v 1.83 2009-03-09 15:48:32 tony Exp $
require 'digest/sha1'
diff --git a/app/models/user_info_request_sent_alert.rb b/app/models/user_info_request_sent_alert.rb
index 3c579a62d..6e521c3ad 100644
--- a/app/models/user_info_request_sent_alert.rb
+++ b/app/models/user_info_request_sent_alert.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 73
+# Schema version: 74
#
# Table name: user_info_request_sent_alerts
#
@@ -17,7 +17,7 @@
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: user_info_request_sent_alert.rb,v 1.29 2009-03-09 01:17:06 francis Exp $
+# $Id: user_info_request_sent_alert.rb,v 1.30 2009-03-09 15:48:32 tony Exp $
class UserInfoRequestSentAlert < ActiveRecord::Base
belongs_to :user
diff --git a/db/schema.rb b/db/schema.rb
index 3096dd422..0f18df4a4 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 73) do
+ActiveRecord::Schema.define(:version => 74) do
create_table "acts_as_xapian_jobs", :force => true do |t|
t.string "model", :null => false
@@ -59,6 +59,13 @@ ActiveRecord::Schema.define(:version => 73) do
t.datetime "updated_at", :null => false
end
+ create_table "holidays", :force => true do |t|
+ t.date "day"
+ t.text "description"
+ end
+
+ add_index "holidays", ["day"], :name => "index_holidays_on_day"
+
create_table "incoming_messages", :force => true do |t|
t.integer "info_request_id", :null => false
t.datetime "created_at", :null => false