Skip to content

Commit

Permalink
* Change explain to text
Browse files Browse the repository at this point in the history
  • Loading branch information
smtlaissezfaire committed Jan 4, 2009
1 parent 21f3483 commit d6e3a8a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Expand Up @@ -3,7 +3,7 @@ def self.up
create_table :query_logs, :options => 'ENGINE=Archive' do |t|
t.text :query
t.float :query_time
t.string :explain
t.text :explain
t.timestamps
end
end
Expand Down
7 changes: 7 additions & 0 deletions spec/enhanced_query_analyzer/logging_spec.rb
Expand Up @@ -107,5 +107,12 @@ def read_fixture(file)
User.find_by_sql(query)
QueryLog.find(:first).query.should == query
end

it "should store the entire explain" do
explain_text = "explain" * 100

QueryLog.create!(:explain => explain_text)
QueryLog.find(:first).explain.should == explain_text
end
end
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Expand Up @@ -27,7 +27,7 @@ def setup_database_connection
create_table :query_logs, :force => true, :options => 'ENGINE=Archive' do |t|
t.text :query
t.float :query_time
t.string :explain
t.text :explain
t.timestamps
end
end
Expand Down

0 comments on commit d6e3a8a

Please sign in to comment.