aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-06-16 09:47:57 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-06-16 09:47:57 +0900
commit5409e5e31b00f05d4e706d2086a3205974a25886 (patch)
treea2294238c57849d749f4cf22417386335d331121 /activerecord/test/schema
parente57d8d090d5d6860e3a5bb3257d6aed5b644ea25 (diff)
downloadrails-5409e5e31b00f05d4e706d2086a3205974a25886.tar.gz
rails-5409e5e31b00f05d4e706d2086a3205974a25886.tar.bz2
rails-5409e5e31b00f05d4e706d2086a3205974a25886.zip
Use nullable `id` column instead of a primary key
`id` column in `subscribers` was added as a primary key for ignorable in INSERT. But it caused `NotNullViolation` for oracle-enhanced adapter. https://github.com/rsim/oracle-enhanced/issues/1357 I changed the column to nullable to address the issue.
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/schema.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 8863736943..dc8bdb98ff 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -814,9 +814,10 @@ ActiveRecord::Schema.define do
t.index :id, unique: true
end
- create_table :subscribers, force: true do |t|
+ create_table :subscribers, id: false, force: true do |t|
t.string :nick, null: false
t.string :name
+ t.integer :id
t.integer :books_count, null: false, default: 0
t.integer :update_count, null: false, default: 0
t.index :nick, unique: true