Skip to content
Snippets Groups Projects
Commit 728a547c authored by Raphael Sofaer's avatar Raphael Sofaer
Browse files

Undo some pg changes

parent 7c454b7d
No related branches found
No related tags found
No related merge requests found
source 'http://rubygems.org'
#gem 'mysql2', '0.2.6'
gem 'pg'
gem 'mysql2', '0.2.6'
#gem 'pg'
gem 'rails', '3.0.3'
gem 'foreigner', '0.9.1'
......
......@@ -226,6 +226,7 @@ GEM
multi_json (1.0.3)
multi_xml (0.2.2)
multipart-post (1.1.2)
mysql2 (0.2.6)
net-ldap (0.2.2)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
......@@ -282,7 +283,6 @@ GEM
oa-openid (= 0.2.6)
open4 (1.0.1)
orm_adapter (0.0.5)
pg (0.11.0)
polyglot (0.3.1)
pyu-ruby-sasl (0.0.3.3)
rack (1.2.3)
......@@ -430,11 +430,11 @@ DEPENDENCIES
linecache (= 0.43)
mini_magick (= 3.2)
mongrel
mysql2 (= 0.2.6)
newrelic_rpm
nokogiri
ohai (= 0.5.8)
omniauth (= 0.2.6)
pg
rails (= 3.0.3)
rcov
resque (= 1.10.0)
......
class PostVisibilitiesOnContacts < ActiveRecord::Migration
class PostVisibility < ActiveRecord::Base; end
def self.move_author_pvs_to_aspect_pvs
where_clause = <<SQL
FROM post_visibilities as pv
......@@ -57,11 +58,7 @@ SQL
end
def self.pv_count
@pv_count ||= lambda {
count = execute('SELECT count(*) FROM post_visibilities').to_a.first.first
count = count.last.to_i if self.connection.class == ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
count
}.call
@pv_count ||= PostVisibility.count
end
def self.up
......
......@@ -81,7 +81,7 @@ ActiveRecord::Schema.define(:version => 20110606192307) do
t.datetime "updated_at"
end
add_index "conversation_visibilities", ["conversation_id", "person_id"], :name => "index_conversation_visibilities_on_everything", :unique => true
add_index "conversation_visibilities", ["conversation_id", "person_id"], :name => "index_conversation_visibilities_on_conversation_id_and_person_id", :unique => true
add_index "conversation_visibilities", ["conversation_id"], :name => "index_conversation_visibilities_on_conversation_id"
add_index "conversation_visibilities", ["person_id"], :name => "index_conversation_visibilities_on_person_id"
......@@ -93,6 +93,8 @@ ActiveRecord::Schema.define(:version => 20110606192307) do
t.datetime "updated_at"
end
add_index "conversations", ["author_id"], :name => "conversations_author_id_fk"
create_table "invitations", :force => true do |t|
t.text "message"
t.integer "sender_id", :null => false
......@@ -117,6 +119,7 @@ ActiveRecord::Schema.define(:version => 20110606192307) do
t.datetime "updated_at"
end
add_index "likes", ["author_id"], :name => "likes_author_id_fk"
add_index "likes", ["guid"], :name => "index_likes_on_guid", :unique => true
add_index "likes", ["post_id"], :name => "index_likes_on_post_id"
......@@ -141,6 +144,7 @@ ActiveRecord::Schema.define(:version => 20110606192307) do
end
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
add_index "messages", ["conversation_id"], :name => "messages_conversation_id_fk"
create_table "notification_actors", :force => true do |t|
t.integer "notification_id"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment