diff options
author | francis <francis> | 2008-04-16 10:27:58 +0000 |
---|---|---|
committer | francis <francis> | 2008-04-16 10:27:58 +0000 |
commit | 8fa715e5df5e388ef15581b93c8f16e3e94beede (patch) | |
tree | efa97d7b8e94cd7a875d097d42ef78b7a815bd3b | |
parent | adabcaefb9e0ef3a070cc677547a39da66affd5a (diff) |
A note
-rw-r--r-- | db/migrate/051_add_track_things_unique_indices.rb | 3 | ||||
-rw-r--r-- | db/schema.rb | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/db/migrate/051_add_track_things_unique_indices.rb b/db/migrate/051_add_track_things_unique_indices.rb index d8810b670..27d901734 100644 --- a/db/migrate/051_add_track_things_unique_indices.rb +++ b/db/migrate/051_add_track_things_unique_indices.rb @@ -6,6 +6,9 @@ class AddTrackThingsUniqueIndices < ActiveRecord::Migration # I guess the query in ./activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb # needs improving to not detect indices with complex components, rather than detect part of them. #execute "create unique index track_things_sent_emails_unique_index on track_things_sent_emails(track_thing_id, coalesce(info_request_event_id, -1), coalesce(user_id, -1), coalesce(public_body_id, -1))" + # + # I tried altering config.active_record.schema_format to :sql in config/environment.rb, but + # got all sorts of other problems with the test user not being a database super user, so gave up again. end def self.down diff --git a/db/schema.rb b/db/schema.rb index 331f7adbe..65b74f2ff 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 => 52) do +ActiveRecord::Schema.define(:version => 53) do create_table "incoming_messages", :force => true do |t| t.integer "info_request_id", :null => false @@ -142,6 +142,8 @@ ActiveRecord::Schema.define(:version => 52) do t.datetime "updated_at" end + add_index "track_things_sent_emails", ["track_thing_id"], :name => "track_things_sent_emails_unique_index", :unique => true + create_table "user_info_request_sent_alerts", :force => true do |t| t.integer "user_id", :null => false t.integer "info_request_id", :null => false |