rails3_pg_deferred_constraints 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,9 @@
|
|
5
5
|
# "table_1" violates foreign key constraint "foreign_key_name" on table "table_2"
|
6
6
|
# DETAIL: Key (id)=(1) is still referenced from table "table_2".
|
7
7
|
# : DELETE FROM "table_1"
|
8
|
-
|
8
|
+
unless defined? RSpec
|
9
|
+
require 'rails/test_help'
|
10
|
+
end
|
9
11
|
|
10
12
|
class ::ActiveRecord::Fixtures
|
11
13
|
|
data/test/dummy/log/test.log
CHANGED
@@ -1108,3 +1108,69 @@ PGError: ERROR: permission denied: "RI_ConstraintTrigger_41179" is a system tri
|
|
1108
1108
|
[1m[35m (0.1ms)[0m BEGIN
|
1109
1109
|
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1110
1110
|
[1m[35m (0.2ms)[0m ROLLBACK
|
1111
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1112
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1113
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1114
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1115
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1116
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1117
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1118
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1119
|
+
[1m[36m (29.8ms)[0m [1mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "books" DISABLE TRIGGER ALL[0m
|
1120
|
+
PGError: ERROR: permission denied: "RI_ConstraintTrigger_41179" is a system trigger
|
1121
|
+
: ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "books" DISABLE TRIGGER ALL
|
1122
|
+
[1m[35m (0.3ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "books" ENABLE TRIGGER ALL
|
1123
|
+
PGError: ERROR: permission denied: "RI_ConstraintTrigger_41179" is a system trigger
|
1124
|
+
: ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "books" ENABLE TRIGGER ALL
|
1125
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1126
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "books" DISABLE TRIGGER ALL[0m
|
1127
|
+
PGError: ERROR: permission denied: "RI_ConstraintTrigger_41179" is a system trigger
|
1128
|
+
: ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "books" DISABLE TRIGGER ALL
|
1129
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "books" ENABLE TRIGGER ALL
|
1130
|
+
PGError: ERROR: permission denied: "RI_ConstraintTrigger_41179" is a system trigger
|
1131
|
+
: ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "books" ENABLE TRIGGER ALL
|
1132
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1133
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1134
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1135
|
+
[1m[35m (0.0ms)[0m SET CONSTRAINTS ALL DEFERRED
|
1136
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
1137
|
+
[1m[35m (50.8ms)[0m TRUNCATE "users", "books"
|
1138
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "users" ("id", "name", "created_at", "updated_at") VALUES (1, 'User_1', '2011-12-30 10:04:31', '2011-12-30 10:04:31')[0m
|
1139
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("id", "name", "created_at", "updated_at") VALUES (2, 'User_2', '2011-12-30 10:04:31', '2011-12-30 10:04:31')
|
1140
|
+
[1m[36mFixture Insert (9.8ms)[0m [1mINSERT INTO "books" ("name", "user_id", "created_at", "updated_at", "id") VALUES ('Book_One', 1, '2011-12-30 10:04:31', '2011-12-30 10:04:31', 980190962)[0m
|
1141
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "books" ("name", "user_id", "created_at", "updated_at", "id") VALUES ('Book_Two', 1, '2011-12-30 10:04:31', '2011-12-30 10:04:31', 298486374)
|
1142
|
+
[1m[36mReset sequence (20.5ms)[0m [1m SELECT setval('"users_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_by FROM "users_id_seq"), (SELECT min_value FROM "users_id_seq")) FROM "users"), false)
|
1143
|
+
[0m
|
1144
|
+
[1m[35mReset sequence (0.7ms)[0m SELECT setval('"books_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_by FROM "books_id_seq"), (SELECT min_value FROM "books_id_seq")) FROM "books"), false)
|
1145
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1146
|
+
[1m[35m (0.1ms)[0m SET CONSTRAINTS ALL IMMEDIATE
|
1147
|
+
[1m[36m (12.1ms)[0m [1mCOMMIT[0m
|
1148
|
+
[1m[35m (0.2ms)[0m BEGIN
|
1149
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1150
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
1151
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1152
|
+
[1m[36m (0.6ms)[0m [1mALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "books" DISABLE TRIGGER ALL[0m
|
1153
|
+
PGError: ERROR: permission denied: "RI_ConstraintTrigger_41179" is a system trigger
|
1154
|
+
: ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "books" DISABLE TRIGGER ALL
|
1155
|
+
[1m[35m (0.4ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "books" ENABLE TRIGGER ALL
|
1156
|
+
PGError: ERROR: permission denied: "RI_ConstraintTrigger_41179" is a system trigger
|
1157
|
+
: ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "books" ENABLE TRIGGER ALL
|
1158
|
+
[1m[35m (0.4ms)[0m ROLLBACK
|
1159
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1160
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1161
|
+
[1m[35m (0.1ms)[0m SET CONSTRAINTS ALL DEFERRED
|
1162
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1163
|
+
[1m[35m (64.0ms)[0m TRUNCATE "users", "books"
|
1164
|
+
[1m[36mFixture Insert (0.6ms)[0m [1mINSERT INTO "users" ("id", "name", "created_at", "updated_at") VALUES (1, 'User_1', '2011-12-30 10:06:41', '2011-12-30 10:06:41')[0m
|
1165
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "users" ("id", "name", "created_at", "updated_at") VALUES (2, 'User_2', '2011-12-30 10:06:41', '2011-12-30 10:06:41')
|
1166
|
+
[1m[36mFixture Insert (0.7ms)[0m [1mINSERT INTO "books" ("name", "user_id", "created_at", "updated_at", "id") VALUES ('Book_One', 1, '2011-12-30 10:06:41', '2011-12-30 10:06:41', 980190962)[0m
|
1167
|
+
[1m[35mFixture Insert (0.6ms)[0m INSERT INTO "books" ("name", "user_id", "created_at", "updated_at", "id") VALUES ('Book_Two', 1, '2011-12-30 10:06:41', '2011-12-30 10:06:41', 298486374)
|
1168
|
+
[1m[36mReset sequence (0.7ms)[0m [1m SELECT setval('"users_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_by FROM "users_id_seq"), (SELECT min_value FROM "users_id_seq")) FROM "users"), false)
|
1169
|
+
[0m
|
1170
|
+
[1m[35mReset sequence (0.5ms)[0m SELECT setval('"books_id_seq"', (SELECT COALESCE(MAX("id")+(SELECT increment_by FROM "books_id_seq"), (SELECT min_value FROM "books_id_seq")) FROM "books"), false)
|
1171
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1172
|
+
[1m[35m (0.1ms)[0m SET CONSTRAINTS ALL IMMEDIATE
|
1173
|
+
[1m[36m (12.4ms)[0m [1mCOMMIT[0m
|
1174
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1175
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1176
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
metadata
CHANGED
@@ -1,77 +1,58 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails3_pg_deferred_constraints
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 3
|
10
|
-
version: 0.0.3
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Potapov Sergey
|
14
9
|
- TMX Credit
|
15
10
|
autorequire:
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
type: :runtime
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
13
|
+
date: 2011-12-30 00:00:00.000000000Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rails
|
17
|
+
requirement: &16981740 !ruby/object:Gem::Requirement
|
25
18
|
none: false
|
26
|
-
requirements:
|
19
|
+
requirements:
|
27
20
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 3
|
32
|
-
- 1
|
33
|
-
- 0
|
21
|
+
- !ruby/object:Gem::Version
|
34
22
|
version: 3.1.0
|
35
|
-
version_requirements: *id001
|
36
|
-
name: rails
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
prerelease: false
|
39
23
|
type: :runtime
|
40
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ">="
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
hash: 3
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
version: "0"
|
49
|
-
version_requirements: *id002
|
50
|
-
name: pg
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
24
|
prerelease: false
|
53
|
-
|
54
|
-
|
25
|
+
version_requirements: *16981740
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: pg
|
28
|
+
requirement: &16981100 !ruby/object:Gem::Requirement
|
55
29
|
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *16981100
|
37
|
+
- !ruby/object:Gem::Dependency
|
64
38
|
name: foreigner
|
65
|
-
|
66
|
-
|
39
|
+
requirement: &16980160 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
type: :development
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *16980160
|
48
|
+
description: Rails 3 engine which provides a hack to avoid RI_ConstraintTrigger Error
|
49
|
+
bug
|
50
|
+
email:
|
67
51
|
- blake131313@gmail.com
|
68
52
|
executables: []
|
69
|
-
|
70
53
|
extensions: []
|
71
|
-
|
72
54
|
extra_rdoc_files: []
|
73
|
-
|
74
|
-
files:
|
55
|
+
files:
|
75
56
|
- lib/rails3_pg_deferred_constraints/fixtures.rb
|
76
57
|
- lib/rails3_pg_deferred_constraints/version.rb
|
77
58
|
- lib/rails3_pg_deferred_constraints/postgresql_adapter.rb
|
@@ -129,38 +110,36 @@ files:
|
|
129
110
|
- test/dummy/Gemfile.lock
|
130
111
|
homepage: https://github.com/greyblake/rails3_pg_deferred_constraints
|
131
112
|
licenses: []
|
132
|
-
|
133
113
|
post_install_message:
|
134
114
|
rdoc_options: []
|
135
|
-
|
136
|
-
require_paths:
|
115
|
+
require_paths:
|
137
116
|
- lib
|
138
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
139
118
|
none: false
|
140
|
-
requirements:
|
141
|
-
- -
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
|
144
|
-
segments:
|
119
|
+
requirements:
|
120
|
+
- - ! '>='
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
segments:
|
145
124
|
- 0
|
146
|
-
|
147
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
hash: 3337235510286566278
|
126
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
127
|
none: false
|
149
|
-
requirements:
|
150
|
-
- -
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
|
153
|
-
segments:
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
segments:
|
154
133
|
- 0
|
155
|
-
|
134
|
+
hash: 3337235510286566278
|
156
135
|
requirements: []
|
157
|
-
|
158
136
|
rubyforge_project:
|
159
137
|
rubygems_version: 1.8.10
|
160
138
|
signing_key:
|
161
139
|
specification_version: 3
|
162
|
-
summary: Rails 3 engine which provides a hack to avoid RI_ConstraintTrigger Error
|
163
|
-
|
140
|
+
summary: Rails 3 engine which provides a hack to avoid RI_ConstraintTrigger Error
|
141
|
+
bug
|
142
|
+
test_files:
|
164
143
|
- test/rails3_pg_deferred_constraints_test.rb
|
165
144
|
- test/test_helper.rb
|
166
145
|
- test/dummy/config/boot.rb
|