mirror of https://github.com/rails/rails
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.
This commit is contained in:
parent
53919bbfd2
commit
d9412d9bb6
|
@ -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
|
||||
|
|
|
@ -21,10 +21,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
|
||||
|
|
Loading…
Reference in New Issue