unconstrained 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +34 -0
- data/lib/unconstrained.rb +19 -0
- data/lib/unconstrained/active_record_plugin.rb +43 -0
- data/lib/unconstrained/handlers.rb +24 -0
- data/lib/unconstrained/handlers/abstract_handler.rb +46 -0
- data/lib/unconstrained/handlers/postgresql.rb +15 -0
- data/lib/unconstrained/version.rb +3 -0
- data/test/destroy_test.rb +18 -0
- data/test/dummy/Rakefile +5 -0
- data/test/dummy/app/models/child.rb +3 -0
- data/test/dummy/app/models/parent.rb +3 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +10 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20150207083618_parents_with_children.rb +10 -0
- data/test/dummy/db/schema.rb +28 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +12 -0
- data/test/dummy/log/test.log +1259 -0
- data/test/fixtures/children.yml +4 -0
- data/test/fixtures/parents.yml +3 -0
- data/test/save_test.rb +10 -0
- data/test/test_helper.rb +21 -0
- metadata +121 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8d05edc3199daf558da30f3d0cc90d57fd177487
|
4
|
+
data.tar.gz: 6b85606e59e0fc1786dfbe049f27ed259b002697
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8db10e923a8b458c05b070cbcb7805e0d7119f60197c67185292dd4bb8da73e286643a7b72a06ad905b30ce1c71ae8e24f54954c1a0a2c0734bcbfa065c03df2
|
7
|
+
data.tar.gz: 2e8e454857106c9a05ef95a9cbbf92757ee35b984865d2a4c87a8097921cfbeb7e2274c887b52e01ecde3bb7094cf384a8fbc997e58e542d881255cf8649d16e
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2015 Alexandros Giouzenis
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Unconstrained'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
Bundler::GemHelper.install_tasks
|
23
|
+
|
24
|
+
require 'rake/testtask'
|
25
|
+
|
26
|
+
Rake::TestTask.new(:test) do |t|
|
27
|
+
t.libs << 'lib'
|
28
|
+
t.libs << 'test'
|
29
|
+
t.pattern = 'test/**/*_test.rb'
|
30
|
+
t.verbose = false
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
task default: :test
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'unconstrained/active_record_plugin'
|
2
|
+
require 'unconstrained/handlers'
|
3
|
+
require 'unconstrained/handlers/abstract_handler'
|
4
|
+
require 'unconstrained/handlers/postgresql'
|
5
|
+
|
6
|
+
module Unconstrained
|
7
|
+
if defined?(Rails::Railtie)
|
8
|
+
class Railtie < Rails::Railtie
|
9
|
+
initializer 'unconstrained.insert_into_active_record' do
|
10
|
+
ActiveSupport.on_load :active_record do
|
11
|
+
ActiveRecord::Base.send(:include, Unconstrained::ActiveRecordPlugin)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
else
|
16
|
+
ActiveRecord::Base.send(:include, Unconstrained::ActiveRecordPlugin) if defined?(ActiveRecord)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Unconstrained
|
2
|
+
module ActiveRecordPlugin
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
included do
|
5
|
+
alias_data_modification_methods
|
6
|
+
end
|
7
|
+
|
8
|
+
module ClassMethods
|
9
|
+
def alias_data_modification_methods#:nodoc:
|
10
|
+
return if method_defined?( :save_without_constraints_handling )
|
11
|
+
alias_method_chain :save, :constraints_handling
|
12
|
+
alias_method_chain :destroy, :constraints_handling
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
protected
|
17
|
+
|
18
|
+
def save_with_constraints_handling
|
19
|
+
with_constraints_handling :save do
|
20
|
+
save_without_constraints_handling
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def destroy_with_constraints_handling
|
25
|
+
with_constraints_handling :destroy do
|
26
|
+
destroy_without_constraints_handling
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def with_constraints_handling action
|
31
|
+
begin
|
32
|
+
yield
|
33
|
+
rescue ActiveRecord::InvalidForeignKey, ActiveRecord::StatementInvalid => e
|
34
|
+
if Handlers.can_handle?( e )
|
35
|
+
Handlers.handle( action, e, self )
|
36
|
+
else
|
37
|
+
raise
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Unconstrained
|
2
|
+
module Handlers
|
3
|
+
@handlers = {}
|
4
|
+
class << self
|
5
|
+
def register exception_name, handler
|
6
|
+
@handlers[exception_name] = handler
|
7
|
+
end
|
8
|
+
def can_handle? exception
|
9
|
+
@handlers.include? exception.try(:original_exception).try(:class).try(:name)
|
10
|
+
end
|
11
|
+
def handle action, exception, record
|
12
|
+
e = exception.original_exception
|
13
|
+
h = @handlers[e.class.name].new(e, record)
|
14
|
+
case action
|
15
|
+
when :destroy
|
16
|
+
h.handle_destroy
|
17
|
+
when :save
|
18
|
+
h.handle_save
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Unconstrained
|
2
|
+
module Handlers
|
3
|
+
class AbstractHandler
|
4
|
+
def initialize error, record
|
5
|
+
@error = error
|
6
|
+
@record = record
|
7
|
+
end
|
8
|
+
|
9
|
+
def handle_save
|
10
|
+
column_name = constraint_error_column
|
11
|
+
if column_name == @record.class.primary_key
|
12
|
+
@record.errors.add(:base, save_error_key, save_error_options)
|
13
|
+
else
|
14
|
+
@record.errors.add(column_name.to_sym, save_error_key, save_error_options)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def handle_destroy
|
19
|
+
@record.errors.add(:base, destroy_error_key, destroy_error_options)
|
20
|
+
end
|
21
|
+
|
22
|
+
def save_error_key
|
23
|
+
:invalid
|
24
|
+
end
|
25
|
+
|
26
|
+
def save_error_options
|
27
|
+
{}
|
28
|
+
end
|
29
|
+
|
30
|
+
def destroy_error_key
|
31
|
+
:"restrict_dependent_destroy.many"
|
32
|
+
end
|
33
|
+
|
34
|
+
def destroy_error_options
|
35
|
+
{ record: constraint_error_table.humanize.downcase }
|
36
|
+
end
|
37
|
+
|
38
|
+
def constraint_error_column
|
39
|
+
end
|
40
|
+
|
41
|
+
def constraint_error_table
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Unconstrained
|
2
|
+
module Handlers
|
3
|
+
class PostgreSQLFKHandler < AbstractHandler
|
4
|
+
def constraint_error_column
|
5
|
+
@error.message =~ /DETAIL: Key \((\w+)\)/ && $1
|
6
|
+
end
|
7
|
+
|
8
|
+
def constraint_error_table
|
9
|
+
@error.message =~ /referenced from table "(\w+)"/ && $1
|
10
|
+
end
|
11
|
+
end
|
12
|
+
Handlers.register 'PG::ForeignKeyViolation', PostgreSQLFKHandler
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class DestroyTest < ActiveSupport::TestCase
|
4
|
+
test "foreign key constraint converted to validation error" do
|
5
|
+
@parent = parents(:prolific)
|
6
|
+
assert_no_difference('Parent.count') do
|
7
|
+
@parent.destroy
|
8
|
+
end
|
9
|
+
assert_not_empty @parent.errors[:base]
|
10
|
+
end
|
11
|
+
test "destroyed without foreign key constraint" do
|
12
|
+
@parent = parents(:unfruitful)
|
13
|
+
assert_difference('Parent.count', -1) do
|
14
|
+
@parent.destroy
|
15
|
+
end
|
16
|
+
assert_empty @parent.errors[:base]
|
17
|
+
end
|
18
|
+
end
|
data/test/dummy/Rakefile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require "unconstrained"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
|
14
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
15
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
16
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
17
|
+
|
18
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
|
+
# config.i18n.default_locale = :de
|
21
|
+
|
22
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
23
|
+
config.active_record.raise_in_transactional_callbacks = true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Randomize the order test cases are executed.
|
35
|
+
config.active_support.test_order = :random
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr.
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
|
40
|
+
# Raises error for missing translations
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
42
|
+
end
|
Binary file
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20150207083618) do
|
15
|
+
|
16
|
+
# These are extensions that must be enabled in order to support this database
|
17
|
+
enable_extension "plpgsql"
|
18
|
+
enable_extension "uuid-ossp"
|
19
|
+
|
20
|
+
create_table "children", force: :cascade do |t|
|
21
|
+
t.integer "parent_id"
|
22
|
+
end
|
23
|
+
|
24
|
+
create_table "parents", force: :cascade do |t|
|
25
|
+
end
|
26
|
+
|
27
|
+
add_foreign_key "children", "parents"
|
28
|
+
end
|
Binary file
|
@@ -0,0 +1,12 @@
|
|
1
|
+
[1m[36m (15.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
2
|
+
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (15.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6
|
+
Migrating to ParentsWithChildren (20150207083618)
|
7
|
+
[1m[35m (0.1ms)[0m begin transaction
|
8
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "parents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL) [0m
|
9
|
+
[1m[35m (0.1ms)[0m CREATE TABLE "children" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "parents_id" integer)
|
10
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150207083618"]]
|
11
|
+
[1m[35m (17.9ms)[0m commit transaction
|
12
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
@@ -0,0 +1,1259 @@
|
|
1
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2
|
+
-----------------------------------
|
3
|
+
ActsAsUnconstrainedTest: test_truth
|
4
|
+
-----------------------------------
|
5
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
+
-----------------------------
|
8
|
+
UnconstrainedTest: test_truth
|
9
|
+
-----------------------------
|
10
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
11
|
+
[1m[36m (11.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
12
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
13
|
+
[1m[36m (14.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
14
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
15
|
+
[1m[36m (14.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
16
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
17
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18
|
+
-----------------------------
|
19
|
+
UnconstrainedTest: test_truth
|
20
|
+
-----------------------------
|
21
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
22
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
23
|
+
[1m[36m (13.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
24
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
25
|
+
[1m[36m (11.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
26
|
+
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
27
|
+
[1m[36m (14.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
28
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
29
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
30
|
+
[1m[36m (11.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
31
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
32
|
+
[1m[36m (15.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
33
|
+
[1m[35m (0.4ms)[0m SELECT version FROM "schema_migrations"
|
34
|
+
[1m[36m (13.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
35
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
36
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
37
|
+
[1m[36m (10.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
38
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
39
|
+
[1m[36m (13.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
40
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
41
|
+
[1m[36m (11.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
42
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
43
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
44
|
+
[1m[36m (15.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
45
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
46
|
+
[1m[36m (12.5ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
47
|
+
[1m[35m (0.2ms)[0m SELECT version FROM "schema_migrations"
|
48
|
+
[1m[36m (12.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
49
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
50
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
51
|
+
[1m[36m (11.5ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
52
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
53
|
+
[1m[36m (9.0ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
54
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
55
|
+
[1m[36m (14.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
56
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
57
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
58
|
+
[1m[36m (13.3ms)[0m [1mCREATE TABLE "children" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "parents_id" integer) [0m
|
59
|
+
[1m[35m (8.2ms)[0m CREATE TABLE "parents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)
|
60
|
+
[1m[36m (14.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
61
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
62
|
+
[1m[36m (14.4ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
63
|
+
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
64
|
+
[1m[36m (13.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150207083618')[0m
|
65
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
66
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
67
|
+
-----------------------------
|
68
|
+
UnconstrainedTest: test_truth
|
69
|
+
-----------------------------
|
70
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
71
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
72
|
+
[1m[35m (0.1ms)[0m begin transaction
|
73
|
+
-----------------------------
|
74
|
+
UnconstrainedTest: test_truth
|
75
|
+
-----------------------------
|
76
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
77
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
78
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
79
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
80
|
+
[1m[35m (0.1ms)[0m begin transaction
|
81
|
+
----------------------------------------------------------------------------
|
82
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
83
|
+
----------------------------------------------------------------------------
|
84
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
85
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
86
|
+
[1m[35m (0.2ms)[0m begin transaction
|
87
|
+
----------------------------------------------------------------------------
|
88
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
89
|
+
----------------------------------------------------------------------------
|
90
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
91
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
92
|
+
[1m[35m (0.1ms)[0m begin transaction
|
93
|
+
----------------------------------------------------------------------------
|
94
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
95
|
+
----------------------------------------------------------------------------
|
96
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
97
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
98
|
+
[1m[35m (0.1ms)[0m begin transaction
|
99
|
+
----------------------------------------------------------------------------
|
100
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
101
|
+
----------------------------------------------------------------------------
|
102
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
103
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
104
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
105
|
+
[1m[35m (0.1ms)[0m begin transaction
|
106
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
107
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
108
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
109
|
+
[1m[35m (0.1ms)[0m begin transaction
|
110
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
111
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
112
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
113
|
+
Migrating to ParentsWithChildren (20150207083618)
|
114
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
115
|
+
[1m[35m (0.3ms)[0m DROP TABLE "children"
|
116
|
+
[1m[36m (0.2ms)[0m [1mDROP TABLE "parents"[0m
|
117
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20150207083618"]]
|
118
|
+
[1m[36m (13.4ms)[0m [1mcommit transaction[0m
|
119
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
120
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
121
|
+
Migrating to ParentsWithChildren (20150207083618)
|
122
|
+
[1m[35m (0.1ms)[0m begin transaction
|
123
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "parents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL) [0m
|
124
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "children" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "parent_id" integer)
|
125
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150207083618"]]
|
126
|
+
[1m[35m (14.4ms)[0m commit transaction
|
127
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
128
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
129
|
+
[1m[35m (0.1ms)[0m begin transaction
|
130
|
+
[1m[36mFixture Delete (0.1ms)[0m [1mDELETE FROM "children"[0m
|
131
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)
|
132
|
+
[1m[36mFixture Delete (0.1ms)[0m [1mDELETE FROM "parents"[0m
|
133
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "parents" ("id") VALUES (1024804656)
|
134
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1002356086)[0m
|
135
|
+
[1m[35m (15.2ms)[0m commit transaction
|
136
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
137
|
+
----------------------------------------------------------------------------
|
138
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
139
|
+
----------------------------------------------------------------------------
|
140
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = ? LIMIT 1 [["id", 1024804656]]
|
141
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
142
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "parents" WHERE "parents"."id" = ? [["id", 1024804656]]
|
143
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
144
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
145
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
146
|
+
[1m[35m (0.1ms)[0m begin transaction
|
147
|
+
[1m[36mFixture Delete (0.1ms)[0m [1mDELETE FROM "children"[0m
|
148
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)
|
149
|
+
[1m[36mFixture Delete (0.0ms)[0m [1mDELETE FROM "parents"[0m
|
150
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "parents" ("id") VALUES (1024804656)
|
151
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1002356086)[0m
|
152
|
+
[1m[35m (14.6ms)[0m commit transaction
|
153
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
154
|
+
----------------------------------------------------------------------------
|
155
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
156
|
+
----------------------------------------------------------------------------
|
157
|
+
[1m[35mParent Load (0.6ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = ? LIMIT 1 [["id", 1024804656]]
|
158
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
159
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
160
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = ?[0m [["id", 1024804656]]
|
161
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
162
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
163
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
164
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
165
|
+
[1m[35m (0.1ms)[0m begin transaction
|
166
|
+
[1m[36mFixture Delete (0.1ms)[0m [1mDELETE FROM "children"[0m
|
167
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)
|
168
|
+
[1m[36mFixture Delete (0.0ms)[0m [1mDELETE FROM "parents"[0m
|
169
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "parents" ("id") VALUES (1024804656)
|
170
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1002356086)[0m
|
171
|
+
[1m[35m (17.7ms)[0m commit transaction
|
172
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
173
|
+
----------------------------------------------------------------------------
|
174
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
175
|
+
----------------------------------------------------------------------------
|
176
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = ? LIMIT 1 [["id", 1024804656]]
|
177
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
178
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
179
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = ?[0m [["id", 1024804656]]
|
180
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
181
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
182
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
183
|
+
[1m[36m (27.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
184
|
+
[1m[35m (10.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
185
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
186
|
+
Migrating to ParentsWithChildren (20150207083618)
|
187
|
+
[1m[35m (0.1ms)[0m BEGIN
|
188
|
+
[1m[36m (8.0ms)[0m [1mCREATE TABLE "parents" ("id" serial primary key) [0m
|
189
|
+
[1m[35m (6.1ms)[0m CREATE TABLE "children" ("id" serial primary key, "parent_id" integer)
|
190
|
+
[1m[36m (1.5ms)[0m [1mALTER TABLE "children" ADD CONSTRAINT "fk_rails_2d768a42d4"
|
191
|
+
FOREIGN KEY ("parent_id")
|
192
|
+
REFERENCES "parents" ("id")
|
193
|
+
[0m
|
194
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150207083618"]]
|
195
|
+
[1m[36m (3.4ms)[0m [1mCOMMIT[0m
|
196
|
+
[1m[35mActiveRecord::SchemaMigration Load (1.7ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
197
|
+
[1m[36m (2.0ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
198
|
+
FROM pg_constraint c
|
199
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
200
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
201
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
202
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
203
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
204
|
+
WHERE c.contype = 'f'
|
205
|
+
AND t1.relname = 'children'
|
206
|
+
AND t3.nspname = ANY (current_schemas(false))
|
207
|
+
ORDER BY c.conname
|
208
|
+
[0m
|
209
|
+
[1m[35m (1.7ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
210
|
+
FROM pg_constraint c
|
211
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
212
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
213
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
214
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
215
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
216
|
+
WHERE c.contype = 'f'
|
217
|
+
AND t1.relname = 'parents'
|
218
|
+
AND t3.nspname = ANY (current_schemas(false))
|
219
|
+
ORDER BY c.conname
|
220
|
+
|
221
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
222
|
+
[1m[35m (5.5ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
223
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
224
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
225
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
226
|
+
[1m[35mFixture Delete (1.2ms)[0m DELETE FROM "parents"
|
227
|
+
[1m[36mFixture Insert (0.7ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
228
|
+
[1m[35mFixture Insert (0.6ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
229
|
+
[1m[36m (2.8ms)[0m [1mCOMMIT[0m
|
230
|
+
[1m[35m (2.1ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
231
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
232
|
+
----------------------------------------------------------------------------
|
233
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
234
|
+
----------------------------------------------------------------------------
|
235
|
+
[1m[35mParent Load (0.6ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
236
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
237
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
238
|
+
[1m[36mSQL (1.4ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
239
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
240
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
241
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
242
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
243
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
244
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
245
|
+
[1m[35m (5.4ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
246
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
247
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "children"
|
248
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
249
|
+
[1m[35mFixture Delete (0.5ms)[0m DELETE FROM "parents"
|
250
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
251
|
+
[1m[35mFixture Insert (0.3ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
252
|
+
[1m[36m (1.8ms)[0m [1mCOMMIT[0m
|
253
|
+
[1m[35m (2.2ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
254
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
255
|
+
----------------------------------------------------------------------------
|
256
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
257
|
+
----------------------------------------------------------------------------
|
258
|
+
[1m[35mParent Load (0.5ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
259
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
260
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
261
|
+
[1m[36mSQL (1.3ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
262
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
263
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
264
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
265
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
266
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
267
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
268
|
+
[1m[35m (5.3ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
269
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
270
|
+
[1m[35mFixture Delete (0.5ms)[0m DELETE FROM "children"
|
271
|
+
[1m[36mFixture Insert (0.4ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
272
|
+
[1m[35mFixture Delete (0.5ms)[0m DELETE FROM "parents"
|
273
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
274
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
275
|
+
[1m[36m (1.7ms)[0m [1mCOMMIT[0m
|
276
|
+
[1m[35m (3.1ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
277
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
278
|
+
----------------------------------------------------------------------------
|
279
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
280
|
+
----------------------------------------------------------------------------
|
281
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
282
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
283
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
284
|
+
[1m[36mSQL (1.0ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
285
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
286
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
287
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
288
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
289
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
290
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
291
|
+
[1m[35m (2.8ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
292
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
293
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "children"
|
294
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
295
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "parents"
|
296
|
+
[1m[36mFixture Insert (0.4ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
297
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
298
|
+
[1m[36m (3.4ms)[0m [1mCOMMIT[0m
|
299
|
+
[1m[35m (3.4ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
300
|
+
[1m[36m (0.5ms)[0m [1mBEGIN[0m
|
301
|
+
----------------------------------------------------------------------------
|
302
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
303
|
+
----------------------------------------------------------------------------
|
304
|
+
[1m[35mParent Load (0.6ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
305
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
306
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
307
|
+
[1m[36mSQL (1.4ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
308
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
309
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
310
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
311
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
312
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
313
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
314
|
+
[1m[35m (3.5ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
315
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
316
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
317
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
318
|
+
[1m[35mFixture Delete (0.9ms)[0m DELETE FROM "parents"
|
319
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
320
|
+
[1m[35mFixture Insert (0.4ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
321
|
+
[1m[36m (3.0ms)[0m [1mCOMMIT[0m
|
322
|
+
[1m[35m (1.8ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
323
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
324
|
+
----------------------------------------------------------------------------
|
325
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
326
|
+
----------------------------------------------------------------------------
|
327
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
328
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
329
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
330
|
+
[1m[36mSQL (0.9ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
331
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
332
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
333
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
334
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
335
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
336
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
337
|
+
[1m[35m (2.3ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
338
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
339
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "children"
|
340
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
341
|
+
[1m[35mFixture Delete (0.2ms)[0m DELETE FROM "parents"
|
342
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
343
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
344
|
+
[1m[36m (2.3ms)[0m [1mCOMMIT[0m
|
345
|
+
[1m[35m (1.6ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
346
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
347
|
+
----------------------------------------------------------------------------
|
348
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
349
|
+
----------------------------------------------------------------------------
|
350
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
351
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
352
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
353
|
+
[1m[36mSQL (0.8ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
354
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
355
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
356
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
357
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
358
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
359
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
360
|
+
[1m[35m (4.1ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
361
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
362
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
363
|
+
[1m[36mFixture Insert (0.4ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
364
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "parents"
|
365
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
366
|
+
[1m[35mFixture Insert (0.5ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
367
|
+
[1m[36m (1.8ms)[0m [1mCOMMIT[0m
|
368
|
+
[1m[35m (3.5ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
369
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
370
|
+
----------------------------------------------------------------------------
|
371
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
372
|
+
----------------------------------------------------------------------------
|
373
|
+
[1m[35mParent Load (0.5ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
374
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
375
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
376
|
+
[1m[36mSQL (1.3ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
377
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
378
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
379
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
380
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
381
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
382
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
383
|
+
[1m[35m (5.9ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
384
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
385
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "children"
|
386
|
+
[1m[36mFixture Insert (0.8ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
387
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "parents"
|
388
|
+
[1m[36mFixture Insert (0.4ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
389
|
+
[1m[35mFixture Insert (0.4ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
390
|
+
[1m[36m (1.6ms)[0m [1mCOMMIT[0m
|
391
|
+
[1m[35m (1.9ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
392
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
393
|
+
----------------------------------------------------------------------------
|
394
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
395
|
+
----------------------------------------------------------------------------
|
396
|
+
[1m[35mParent Load (0.6ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
397
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
398
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
399
|
+
[1m[36mSQL (1.2ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
400
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
401
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
402
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
403
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
404
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
405
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
406
|
+
[1m[35m (2.9ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
407
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
408
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "children"
|
409
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
410
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "parents"
|
411
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
412
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
413
|
+
[1m[36m (2.5ms)[0m [1mCOMMIT[0m
|
414
|
+
[1m[35m (1.9ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
415
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
416
|
+
----------------------------------------------------------------------------
|
417
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
418
|
+
----------------------------------------------------------------------------
|
419
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
420
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
421
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
422
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
423
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
424
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
425
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
426
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
427
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
428
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
429
|
+
[1m[35m (3.5ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
430
|
+
[1m[36m (0.5ms)[0m [1mBEGIN[0m
|
431
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "children"
|
432
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
433
|
+
[1m[35mFixture Delete (0.5ms)[0m DELETE FROM "parents"
|
434
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
435
|
+
[1m[35mFixture Insert (0.3ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
436
|
+
[1m[36m (1.8ms)[0m [1mCOMMIT[0m
|
437
|
+
[1m[35m (2.4ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
438
|
+
[1m[36m (0.5ms)[0m [1mBEGIN[0m
|
439
|
+
----------------------------------------------------------------------------
|
440
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
441
|
+
----------------------------------------------------------------------------
|
442
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
443
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
444
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
445
|
+
[1m[36mSQL (0.9ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
446
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
447
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
448
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
449
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
450
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
451
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
452
|
+
[1m[35m (1.9ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
453
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
454
|
+
[1m[35mFixture Delete (0.2ms)[0m DELETE FROM "children"
|
455
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
456
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "parents"
|
457
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
458
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
459
|
+
[1m[36m (2.5ms)[0m [1mCOMMIT[0m
|
460
|
+
[1m[35m (3.5ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
461
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
462
|
+
----------------------------------------------------------------------------
|
463
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
464
|
+
----------------------------------------------------------------------------
|
465
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
466
|
+
[1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
467
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
468
|
+
[1m[36mSQL (0.9ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
469
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
470
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
471
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
472
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
473
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
474
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
475
|
+
[1m[35m (2.6ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
476
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
477
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "children"
|
478
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
479
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "parents"
|
480
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
481
|
+
[1m[35mFixture Insert (0.5ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
482
|
+
[1m[36m (3.3ms)[0m [1mCOMMIT[0m
|
483
|
+
[1m[35m (3.0ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
484
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
485
|
+
----------------------------------------------------------------------------
|
486
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
487
|
+
----------------------------------------------------------------------------
|
488
|
+
[1m[35mParent Load (0.6ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
489
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
490
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
491
|
+
[1m[36mSQL (1.3ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
492
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
493
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
494
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
495
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
496
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
497
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
498
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
499
|
+
[1m[35m (3.2ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
500
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
501
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "children"
|
502
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
503
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "parents"
|
504
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
505
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
506
|
+
[1m[36m (2.8ms)[0m [1mCOMMIT[0m
|
507
|
+
[1m[35m (2.6ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
508
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
509
|
+
----------------------------------------------------------------------------
|
510
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
511
|
+
----------------------------------------------------------------------------
|
512
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
513
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
514
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
515
|
+
[1m[36mSQL (0.7ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
516
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
517
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
518
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
519
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
520
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
521
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
522
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
523
|
+
[1m[35m (3.7ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
524
|
+
[1m[36m (0.5ms)[0m [1mBEGIN[0m
|
525
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "children"
|
526
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
527
|
+
[1m[35mFixture Delete (0.8ms)[0m DELETE FROM "parents"
|
528
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
529
|
+
[1m[35mFixture Insert (0.5ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
530
|
+
[1m[36m (2.8ms)[0m [1mCOMMIT[0m
|
531
|
+
[1m[35m (3.2ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
532
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
533
|
+
----------------------------------------------------------------------------
|
534
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
535
|
+
----------------------------------------------------------------------------
|
536
|
+
[1m[35mParent Load (0.5ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
537
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
538
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
539
|
+
[1m[36mSQL (1.2ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
540
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
541
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
542
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
543
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
544
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
545
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
546
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
547
|
+
[1m[35m (4.0ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
548
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
549
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
550
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
551
|
+
[1m[35mFixture Delete (0.8ms)[0m DELETE FROM "parents"
|
552
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
553
|
+
[1m[35mFixture Insert (0.5ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
554
|
+
[1m[36m (2.7ms)[0m [1mCOMMIT[0m
|
555
|
+
[1m[35m (2.0ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
556
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
557
|
+
----------------------------------------------------------------------------
|
558
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
559
|
+
----------------------------------------------------------------------------
|
560
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
561
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
562
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
563
|
+
[1m[36mSQL (1.1ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
564
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
565
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
566
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
567
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
568
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
569
|
+
[1m[35m (0.4ms)[0m ROLLBACK
|
570
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
571
|
+
[1m[35m (2.9ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
572
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
573
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "children"
|
574
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
575
|
+
[1m[35mFixture Delete (0.2ms)[0m DELETE FROM "parents"
|
576
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
577
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
578
|
+
[1m[36m (1.4ms)[0m [1mCOMMIT[0m
|
579
|
+
[1m[35m (3.3ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
580
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
581
|
+
----------------------------------------------------------------------------
|
582
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
583
|
+
----------------------------------------------------------------------------
|
584
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
585
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
586
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
587
|
+
[1m[36mSQL (1.2ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
588
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
589
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
590
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
591
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
592
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
593
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
594
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
595
|
+
[1m[35m (2.9ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
596
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
597
|
+
[1m[35mFixture Delete (0.2ms)[0m DELETE FROM "children"
|
598
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
599
|
+
[1m[35mFixture Delete (0.2ms)[0m DELETE FROM "parents"
|
600
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
601
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
602
|
+
[1m[36m (2.8ms)[0m [1mCOMMIT[0m
|
603
|
+
[1m[35m (3.6ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
604
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
605
|
+
----------------------------------------------------------------------------
|
606
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
607
|
+
----------------------------------------------------------------------------
|
608
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
609
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
610
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
611
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
612
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
613
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
614
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
615
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
616
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
617
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
618
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
619
|
+
[1m[35m (2.7ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
620
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
621
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "children"
|
622
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
623
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "parents"
|
624
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
625
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
626
|
+
[1m[36m (1.5ms)[0m [1mCOMMIT[0m
|
627
|
+
[1m[35m (2.9ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
628
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
629
|
+
----------------------------------------------------------------------------
|
630
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
631
|
+
----------------------------------------------------------------------------
|
632
|
+
[1m[35mParent Load (0.2ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
633
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
634
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
635
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
636
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
637
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
638
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
639
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
640
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
641
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
642
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
643
|
+
[1m[35m (2.5ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
644
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
645
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
646
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
647
|
+
[1m[35mFixture Delete (0.8ms)[0m DELETE FROM "parents"
|
648
|
+
[1m[36mFixture Insert (0.4ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
649
|
+
[1m[35mFixture Insert (0.4ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
650
|
+
[1m[36m (3.2ms)[0m [1mCOMMIT[0m
|
651
|
+
[1m[35m (1.9ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
652
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
653
|
+
----------------------------------------------------------------------------
|
654
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
655
|
+
----------------------------------------------------------------------------
|
656
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
657
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
658
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
659
|
+
[1m[36mSQL (1.0ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
660
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
661
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
662
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
663
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
664
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
665
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
666
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
667
|
+
[1m[35m (2.0ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
668
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
669
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "children"
|
670
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
671
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "parents"
|
672
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
673
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
674
|
+
[1m[36m (1.6ms)[0m [1mCOMMIT[0m
|
675
|
+
[1m[35m (2.1ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
676
|
+
[1m[36m (0.8ms)[0m [1mBEGIN[0m
|
677
|
+
----------------------------------------------------------------------------
|
678
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
679
|
+
----------------------------------------------------------------------------
|
680
|
+
[1m[35mParent Load (0.2ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
681
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
682
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
683
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
684
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
685
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
686
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
687
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
688
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
689
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
690
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
691
|
+
[1m[35m (2.7ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
692
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
693
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
694
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
695
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "parents"
|
696
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
697
|
+
[1m[35mFixture Insert (0.4ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
698
|
+
[1m[36m (3.1ms)[0m [1mCOMMIT[0m
|
699
|
+
[1m[35m (2.0ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
700
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
701
|
+
----------------------------------------------------------------------------
|
702
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
703
|
+
----------------------------------------------------------------------------
|
704
|
+
[1m[35mParent Load (0.6ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
705
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
706
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
707
|
+
[1m[36mSQL (1.3ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
708
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
709
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
710
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
711
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
712
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
713
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
714
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
715
|
+
[1m[35m (3.8ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
716
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
717
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
718
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
719
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "parents"
|
720
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
721
|
+
[1m[35mFixture Insert (0.5ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
722
|
+
[1m[36m (3.2ms)[0m [1mCOMMIT[0m
|
723
|
+
[1m[35m (3.4ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
724
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
725
|
+
----------------------------------------------------------------------------
|
726
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
727
|
+
----------------------------------------------------------------------------
|
728
|
+
[1m[35mParent Load (0.5ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
729
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
730
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
731
|
+
[1m[36mSQL (1.1ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
732
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
733
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
734
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
735
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
736
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
737
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
738
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
739
|
+
[1m[35m (3.7ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
740
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
741
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "children"
|
742
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
743
|
+
[1m[35mFixture Delete (0.8ms)[0m DELETE FROM "parents"
|
744
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
745
|
+
[1m[35mFixture Insert (0.5ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
746
|
+
[1m[36m (3.2ms)[0m [1mCOMMIT[0m
|
747
|
+
[1m[35m (3.1ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
748
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
749
|
+
----------------------------------------------------------------------------
|
750
|
+
UnconstrainedTest: test_foreign_key_constraint_converted_to_validation_error
|
751
|
+
----------------------------------------------------------------------------
|
752
|
+
[1m[35mParent Load (0.6ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
753
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
754
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
755
|
+
[1m[36mSQL (1.3ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
756
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
757
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
758
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
759
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
760
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
761
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
762
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
763
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
764
|
+
[1m[35m (1.8ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
765
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
766
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "children"
|
767
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
768
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "parents"
|
769
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
770
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
771
|
+
[1m[36m (1.8ms)[0m [1mCOMMIT[0m
|
772
|
+
[1m[35m (2.2ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
773
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
774
|
+
----------------------------------------------------------
|
775
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
776
|
+
----------------------------------------------------------
|
777
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
778
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
779
|
+
----------------------------------------------------------------------
|
780
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
781
|
+
----------------------------------------------------------------------
|
782
|
+
[1m[35mParent Load (0.2ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
783
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
784
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
785
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
786
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
787
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
788
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
789
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
790
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
791
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
792
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
793
|
+
[1m[35m (2.7ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
794
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
795
|
+
[1m[35mFixture Delete (0.5ms)[0m DELETE FROM "children"
|
796
|
+
[1m[36mFixture Insert (0.4ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
797
|
+
[1m[35mFixture Delete (0.4ms)[0m DELETE FROM "parents"
|
798
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
799
|
+
[1m[35mFixture Insert (0.4ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
800
|
+
[1m[36m (1.8ms)[0m [1mCOMMIT[0m
|
801
|
+
[1m[35m (3.1ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
802
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
803
|
+
----------------------------------------------------------------------
|
804
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
805
|
+
----------------------------------------------------------------------
|
806
|
+
[1m[35mParent Load (0.5ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
807
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
808
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
809
|
+
[1m[36mSQL (1.4ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
810
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
811
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
812
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
813
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
814
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
815
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
816
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
817
|
+
----------------------------------------------------------
|
818
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
819
|
+
----------------------------------------------------------
|
820
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
821
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
822
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
823
|
+
[1m[36mSQL (0.7ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
824
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
825
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
826
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
827
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
828
|
+
[1m[35m (2.6ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
829
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
830
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
831
|
+
[1m[36mFixture Insert (0.4ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
832
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "parents"
|
833
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
834
|
+
[1m[35mFixture Insert (0.3ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
835
|
+
[1m[36m (1.7ms)[0m [1mCOMMIT[0m
|
836
|
+
[1m[35m (2.8ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
837
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
838
|
+
----------------------------------------------------------------------
|
839
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
840
|
+
----------------------------------------------------------------------
|
841
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
842
|
+
[1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
843
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
844
|
+
[1m[36mSQL (0.8ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
845
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
846
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
847
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
848
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
849
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
850
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
851
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
852
|
+
----------------------------------------------------------
|
853
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
854
|
+
----------------------------------------------------------
|
855
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
856
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
857
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
858
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
859
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
860
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
861
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
862
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
863
|
+
[1m[35m (3.9ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
864
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
865
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
866
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
867
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "parents"
|
868
|
+
[1m[36mFixture Insert (0.4ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
869
|
+
[1m[35mFixture Insert (0.3ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
870
|
+
[1m[36m (2.9ms)[0m [1mCOMMIT[0m
|
871
|
+
[1m[35m (3.5ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
872
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
873
|
+
----------------------------------------------------------
|
874
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
875
|
+
----------------------------------------------------------
|
876
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
877
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
878
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
879
|
+
[1m[36mSQL (0.8ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
880
|
+
[1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
|
881
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
882
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
883
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
884
|
+
----------------------------------------------------------------------
|
885
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
886
|
+
----------------------------------------------------------------------
|
887
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
888
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
889
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
890
|
+
[1m[36mSQL (1.0ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
891
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
892
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
893
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
894
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
895
|
+
[1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
896
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
897
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
898
|
+
[1m[35m (3.5ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
899
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
900
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "children"
|
901
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
902
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "parents"
|
903
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
904
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
905
|
+
[1m[36m (1.5ms)[0m [1mCOMMIT[0m
|
906
|
+
[1m[35m (3.5ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
907
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
908
|
+
----------------------------------------------------------
|
909
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
910
|
+
----------------------------------------------------------
|
911
|
+
[1m[35mParent Load (0.2ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
912
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
913
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
914
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
915
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
916
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
917
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
918
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
919
|
+
----------------------------------------------------------------------
|
920
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
921
|
+
----------------------------------------------------------------------
|
922
|
+
[1m[35mParent Load (0.2ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
923
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
924
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
925
|
+
[1m[36mSQL (0.7ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
926
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
927
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
928
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
929
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
930
|
+
[1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
931
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
932
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
933
|
+
[1m[35m (4.1ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
934
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
935
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
936
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
937
|
+
[1m[35mFixture Delete (0.9ms)[0m DELETE FROM "parents"
|
938
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
939
|
+
[1m[35mFixture Insert (0.4ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
940
|
+
[1m[36m (2.7ms)[0m [1mCOMMIT[0m
|
941
|
+
[1m[35m (3.0ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
942
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
943
|
+
-------------------------------------------------------------------
|
944
|
+
SaveTest: test_foreign_key_constraint_converted_to_validation_error
|
945
|
+
-------------------------------------------------------------------
|
946
|
+
[1m[35mChild Load (0.5ms)[0m SELECT "children".* FROM "children" WHERE "children"."id" = $1 LIMIT 1 [["id", 980190962]]
|
947
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
948
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2 [["parent_id", -1], ["id", 980190962]]
|
949
|
+
PG::ForeignKeyViolation: ERROR: insert or update on table "children" violates foreign key constraint "fk_rails_2d768a42d4"
|
950
|
+
DETAIL: Key (parent_id)=(-1) is not present in table "parents".
|
951
|
+
: UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2
|
952
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
953
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
954
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
955
|
+
----------------------------------------------------------
|
956
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
957
|
+
----------------------------------------------------------
|
958
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
959
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
960
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
961
|
+
[1m[36mSQL (0.9ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
962
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
963
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
964
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
965
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
966
|
+
----------------------------------------------------------------------
|
967
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
968
|
+
----------------------------------------------------------------------
|
969
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
970
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
971
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
972
|
+
[1m[36mSQL (0.8ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
973
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
974
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
975
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
976
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
977
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
978
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
979
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
980
|
+
[1m[35m (3.8ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
981
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
982
|
+
[1m[35mFixture Delete (0.4ms)[0m DELETE FROM "children"
|
983
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
984
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "parents"
|
985
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
986
|
+
[1m[35mFixture Insert (0.4ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
987
|
+
[1m[36m (1.8ms)[0m [1mCOMMIT[0m
|
988
|
+
[1m[35m (3.5ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
989
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
990
|
+
-------------------------------------------------------------------
|
991
|
+
SaveTest: test_foreign_key_constraint_converted_to_validation_error
|
992
|
+
-------------------------------------------------------------------
|
993
|
+
[1m[35mChild Load (0.5ms)[0m SELECT "children".* FROM "children" WHERE "children"."id" = $1 LIMIT 1 [["id", 980190962]]
|
994
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
995
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2 [["parent_id", -1], ["id", 980190962]]
|
996
|
+
PG::ForeignKeyViolation: ERROR: insert or update on table "children" violates foreign key constraint "fk_rails_2d768a42d4"
|
997
|
+
DETAIL: Key (parent_id)=(-1) is not present in table "parents".
|
998
|
+
: UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2
|
999
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1000
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1001
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
1002
|
+
----------------------------------------------------------------------
|
1003
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
1004
|
+
----------------------------------------------------------------------
|
1005
|
+
[1m[35mParent Load (0.5ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
1006
|
+
[1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1007
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
1008
|
+
[1m[36mSQL (1.1ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
1009
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
1010
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
1011
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
1012
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
1013
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
1014
|
+
[1m[35m (0.3ms)[0m BEGIN
|
1015
|
+
----------------------------------------------------------
|
1016
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
1017
|
+
----------------------------------------------------------
|
1018
|
+
[1m[36mParent Load (0.5ms)[0m [1mSELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1[0m [["id", 1002356086]]
|
1019
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "parents"
|
1020
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
1021
|
+
[1m[35mSQL (0.6ms)[0m DELETE FROM "parents" WHERE "parents"."id" = $1 [["id", 1002356086]]
|
1022
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1023
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "parents"
|
1024
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
1025
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1026
|
+
[1m[35m (2.7ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
1027
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
1028
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
1029
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
1030
|
+
[1m[35mFixture Delete (0.7ms)[0m DELETE FROM "parents"
|
1031
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
1032
|
+
[1m[35mFixture Insert (0.5ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
1033
|
+
[1m[36m (3.3ms)[0m [1mCOMMIT[0m
|
1034
|
+
[1m[35m (3.0ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
1035
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
1036
|
+
-------------------------------------------------------------------
|
1037
|
+
SaveTest: test_foreign_key_constraint_converted_to_validation_error
|
1038
|
+
-------------------------------------------------------------------
|
1039
|
+
[1m[35mChild Load (0.6ms)[0m SELECT "children".* FROM "children" WHERE "children"."id" = $1 LIMIT 1 [["id", 980190962]]
|
1040
|
+
[1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
|
1041
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2 [["parent_id", -1], ["id", 980190962]]
|
1042
|
+
PG::ForeignKeyViolation: ERROR: insert or update on table "children" violates foreign key constraint "fk_rails_2d768a42d4"
|
1043
|
+
DETAIL: Key (parent_id)=(-1) is not present in table "parents".
|
1044
|
+
: UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2
|
1045
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1046
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
1047
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
1048
|
+
----------------------------------------------------------
|
1049
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
1050
|
+
----------------------------------------------------------
|
1051
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
1052
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1053
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
1054
|
+
[1m[36mSQL (0.9ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
1055
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
1056
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1057
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
1058
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
1059
|
+
----------------------------------------------------------------------
|
1060
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
1061
|
+
----------------------------------------------------------------------
|
1062
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
1063
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1064
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
1065
|
+
[1m[36mSQL (0.8ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
1066
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
1067
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
1068
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
1069
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
1070
|
+
[1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1071
|
+
[1m[35m (0.4ms)[0m ROLLBACK
|
1072
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1073
|
+
[1m[35m (3.7ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
1074
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
1075
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
1076
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
1077
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "parents"
|
1078
|
+
[1m[36mFixture Insert (0.4ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
1079
|
+
[1m[35mFixture Insert (0.4ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
1080
|
+
[1m[36m (1.9ms)[0m [1mCOMMIT[0m
|
1081
|
+
[1m[35m (3.5ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
1082
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
1083
|
+
----------------------------------------------------------
|
1084
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
1085
|
+
----------------------------------------------------------
|
1086
|
+
[1m[35mParent Load (0.5ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
1087
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1088
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
1089
|
+
[1m[36mSQL (0.9ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
1090
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
1091
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1092
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
1093
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
1094
|
+
----------------------------------------------------------------------
|
1095
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
1096
|
+
----------------------------------------------------------------------
|
1097
|
+
[1m[35mParent Load (0.4ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
1098
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1099
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
1100
|
+
[1m[36mSQL (0.9ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
1101
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
1102
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
1103
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
1104
|
+
[1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
1105
|
+
[1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1106
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
1107
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
1108
|
+
-------------------------------------------------------------------
|
1109
|
+
SaveTest: test_foreign_key_constraint_converted_to_validation_error
|
1110
|
+
-------------------------------------------------------------------
|
1111
|
+
[1m[35mChild Load (0.4ms)[0m SELECT "children".* FROM "children" WHERE "children"."id" = $1 LIMIT 1 [["id", 980190962]]
|
1112
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
1113
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2 [["parent_id", -1], ["id", 980190962]]
|
1114
|
+
PG::ForeignKeyViolation: ERROR: insert or update on table "children" violates foreign key constraint "fk_rails_2d768a42d4"
|
1115
|
+
DETAIL: Key (parent_id)=(-1) is not present in table "parents".
|
1116
|
+
: UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2
|
1117
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1118
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
1119
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1120
|
+
[1m[35m (4.3ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
1121
|
+
[1m[36m (0.4ms)[0m [1mBEGIN[0m
|
1122
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "children"
|
1123
|
+
[1m[36mFixture Insert (0.3ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
1124
|
+
[1m[35mFixture Delete (0.8ms)[0m DELETE FROM "parents"
|
1125
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
1126
|
+
[1m[35mFixture Insert (0.4ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
1127
|
+
[1m[36m (1.8ms)[0m [1mCOMMIT[0m
|
1128
|
+
[1m[35m (3.5ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
1129
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
1130
|
+
-------------------------------------------------------------------
|
1131
|
+
SaveTest: test_foreign_key_constraint_converted_to_validation_error
|
1132
|
+
-------------------------------------------------------------------
|
1133
|
+
[1m[35mChild Load (0.5ms)[0m SELECT "children".* FROM "children" WHERE "children"."id" = $1 LIMIT 1 [["id", 980190962]]
|
1134
|
+
[1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
|
1135
|
+
[1m[35mSQL (1.4ms)[0m UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2 [["parent_id", -1], ["id", 980190962]]
|
1136
|
+
PG::ForeignKeyViolation: ERROR: insert or update on table "children" violates foreign key constraint "fk_rails_2d768a42d4"
|
1137
|
+
DETAIL: Key (parent_id)=(-1) is not present in table "parents".
|
1138
|
+
: UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2
|
1139
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1140
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
1141
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
1142
|
+
----------------------------------------------------------
|
1143
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
1144
|
+
----------------------------------------------------------
|
1145
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
1146
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1147
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
1148
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
1149
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
1150
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1151
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1152
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
1153
|
+
----------------------------------------------------------------------
|
1154
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
1155
|
+
----------------------------------------------------------------------
|
1156
|
+
[1m[35mParent Load (0.2ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
1157
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1158
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1159
|
+
[1m[36mSQL (0.4ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
1160
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
1161
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
1162
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
1163
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
1164
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1165
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1166
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.8ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1167
|
+
[1m[35m (2.1ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
1168
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
1169
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "children"
|
1170
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
1171
|
+
[1m[35mFixture Delete (0.3ms)[0m DELETE FROM "parents"
|
1172
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
1173
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
1174
|
+
[1m[36m (7.0ms)[0m [1mCOMMIT[0m
|
1175
|
+
[1m[35m (1.7ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
1176
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1177
|
+
----------------------------------------------------------
|
1178
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
1179
|
+
----------------------------------------------------------
|
1180
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
1181
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1182
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1183
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
1184
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1185
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1186
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1187
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
1188
|
+
----------------------------------------------------------------------
|
1189
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
1190
|
+
----------------------------------------------------------------------
|
1191
|
+
[1m[35mParent Load (0.3ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
1192
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1193
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
1194
|
+
[1m[36mSQL (0.6ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
1195
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
1196
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
1197
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
1198
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
1199
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1200
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1201
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1202
|
+
-------------------------------------------------------------------
|
1203
|
+
SaveTest: test_foreign_key_constraint_converted_to_validation_error
|
1204
|
+
-------------------------------------------------------------------
|
1205
|
+
[1m[35mChild Load (0.3ms)[0m SELECT "children".* FROM "children" WHERE "children"."id" = $1 LIMIT 1 [["id", 980190962]]
|
1206
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
1207
|
+
[1m[35mSQL (0.7ms)[0m UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2 [["parent_id", 221917195], ["id", 980190962]]
|
1208
|
+
PG::ForeignKeyViolation: ERROR: insert or update on table "children" violates foreign key constraint "fk_rails_2d768a42d4"
|
1209
|
+
DETAIL: Key (parent_id)=(221917195) is not present in table "parents".
|
1210
|
+
: UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2
|
1211
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1212
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1213
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1214
|
+
[1m[35m (4.3ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
1215
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
1216
|
+
[1m[35mFixture Delete (0.2ms)[0m DELETE FROM "children"
|
1217
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
1218
|
+
[1m[35mFixture Delete (0.2ms)[0m DELETE FROM "parents"
|
1219
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
1220
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
1221
|
+
[1m[36m (1.5ms)[0m [1mCOMMIT[0m
|
1222
|
+
[1m[35m (2.8ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
1223
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1224
|
+
-------------------------------------------------------------------
|
1225
|
+
SaveTest: test_foreign_key_constraint_converted_to_validation_error
|
1226
|
+
-------------------------------------------------------------------
|
1227
|
+
[1m[35mChild Load (0.3ms)[0m SELECT "children".* FROM "children" WHERE "children"."id" = $1 LIMIT 1 [["id", 980190962]]
|
1228
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
1229
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2 [["parent_id", 221917195], ["id", 980190962]]
|
1230
|
+
PG::ForeignKeyViolation: ERROR: insert or update on table "children" violates foreign key constraint "fk_rails_2d768a42d4"
|
1231
|
+
DETAIL: Key (parent_id)=(221917195) is not present in table "parents".
|
1232
|
+
: UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2
|
1233
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1234
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1235
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1236
|
+
----------------------------------------------------------
|
1237
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
1238
|
+
----------------------------------------------------------
|
1239
|
+
[1m[35mParent Load (0.2ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
1240
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1241
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
1242
|
+
[1m[36mSQL (0.4ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
1243
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
1244
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1245
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1246
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1247
|
+
----------------------------------------------------------------------
|
1248
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
1249
|
+
----------------------------------------------------------------------
|
1250
|
+
[1m[35mParent Load (1.2ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
1251
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1252
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
1253
|
+
[1m[36mSQL (0.7ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
1254
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
1255
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
1256
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
1257
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
1258
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
1259
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|