aboutsummaryrefslogtreecommitdiffstats
path: root/guides/bug_report_templates/active_record_gem.rb
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2015-01-19 09:03:02 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2015-01-19 09:03:02 +0530
commitd9412d9bb61177853f90902ac891a9b2908206bb (patch)
tree8698c0c92016bfd5de22625cb795a99e2764d368 /guides/bug_report_templates/active_record_gem.rb
parent53919bbfd2b3232ec66e0cdea7b387725653ab43 (diff)
downloadrails-d9412d9bb61177853f90902ac891a9b2908206bb.tar.gz
rails-d9412d9bb61177853f90902ac891a9b2908206bb.tar.bz2
rails-d9412d9bb61177853f90902ac891a9b2908206bb.zip
Use force: true options for creating tables in bug templates
- Generally we have to run the bug templates multiple times to get them right and it always complains because the posts and comments tables already exist due to earlier runs. - Using force: true will eliminate this issue.
Diffstat (limited to 'guides/bug_report_templates/active_record_gem.rb')
-rw-r--r--guides/bug_report_templates/active_record_gem.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/bug_report_templates/active_record_gem.rb b/guides/bug_report_templates/active_record_gem.rb
index 66bbb15afb..b295d9d21f 100644
--- a/guides/bug_report_templates/active_record_gem.rb
+++ b/guides/bug_report_templates/active_record_gem.rb
@@ -12,10 +12,10 @@ ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:'
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Schema.define do
- create_table :posts do |t|
+ create_table :posts, force: true do |t|
end
- create_table :comments do |t|
+ create_table :comments, force: true do |t|
t.integer :post_id
end
end