aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2014-09-06 20:06:40 +0900
committerAkira Matsuda <ronnie@dio.jp>2014-09-06 23:28:18 +0900
commitda2f61947db287b5ba0343905da9316eecfd43f3 (patch)
tree8697e52bdff9fe718c9529c162cc7dd05cf97011 /activerecord/test/schema
parente11914b55110e8376e43476668ed8d5323b8dcba (diff)
downloadrails-da2f61947db287b5ba0343905da9316eecfd43f3.tar.gz
rails-da2f61947db287b5ba0343905da9316eecfd43f3.tar.bz2
rails-da2f61947db287b5ba0343905da9316eecfd43f3.zip
Dynamically modified schema and association would not be correctly reset
This fixes <"SQLite3::SQLException: no such column: legacy_things.person_id: SELECT \"legacy_things\".* FROM \"legacy_things\" WHERE \"legacy_things\".\"person_id\" = ?"> in OptimisticLockingTest#test_lock_destroy
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/schema.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 3161edd58e..10de3d34cb 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -546,6 +546,12 @@ ActiveRecord::Schema.define do
t.column :treasure_id, :integer
end
+ create_table :personal_legacy_things, force: true do |t|
+ t.integer :tps_report_number
+ t.integer :person_id
+ t.integer :version, null: false, default: 0
+ end
+
create_table :pets, primary_key: :pet_id, force: true do |t|
t.string :name
t.integer :owner_id, :integer