Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Change explain to text

  • Loading branch information...
commit d6e3a8ae004447f79a36ad0f2909373cd666417f 1 parent 21f3483
@smtlaissezfaire authored
View
2  generators/enhanced_query_analyzer/templates/migrate/create_query_log.rb
@@ -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
View
7 spec/enhanced_query_analyzer/logging_spec.rb
@@ -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
View
2  spec/spec_helper.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.