unconstrained 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/unconstrained/active_record_plugin.rb +2 -2
- data/lib/unconstrained/version.rb +1 -1
- data/test/dummy/log/test.log +47 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 282b04262286a7a1ca54945f8b5868db75935418
|
|
4
|
+
data.tar.gz: 81277c497320af06e70f856fd35dcdcd6075901c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a731af0d27a655f3ce0c526c702162ec3993b2f4692878c13573882ab12cd5383b57ff43e6e900fdb37cc5452e048455a0a79a84401d183171246e8aa8bc791d
|
|
7
|
+
data.tar.gz: 99f61bf95c0c759074ec1af7b373e59a34e663960a9f9021ee34fcf69a5e11166f3d3f1014a36f2c2dc168e05d7ffc1127a10149d29385f72ad137ebbc0e09e1
|
|
@@ -15,9 +15,9 @@ module Unconstrained
|
|
|
15
15
|
|
|
16
16
|
protected
|
|
17
17
|
|
|
18
|
-
def save_with_constraints_handling
|
|
18
|
+
def save_with_constraints_handling(*args)
|
|
19
19
|
with_constraints_handling :save do
|
|
20
|
-
save_without_constraints_handling
|
|
20
|
+
save_without_constraints_handling(*args)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
data/test/dummy/log/test.log
CHANGED
|
@@ -1257,3 +1257,50 @@ DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
|
|
1257
1257
|
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
|
1258
1258
|
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
|
1259
1259
|
[1m[35m (0.1ms)[0m ROLLBACK
|
|
1260
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.0ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
1261
|
+
[1m[35m (4.9ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "parents" DISABLE TRIGGER ALL;ALTER TABLE "children" DISABLE TRIGGER ALL
|
|
1262
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
|
1263
|
+
[1m[35mFixture Delete (1.2ms)[0m DELETE FROM "children"
|
|
1264
|
+
[1m[36mFixture Insert (0.4ms)[0m [1mINSERT INTO "children" ("id", "parent_id") VALUES (980190962, 1024804656)[0m
|
|
1265
|
+
[1m[35mFixture Delete (1.2ms)[0m DELETE FROM "parents"
|
|
1266
|
+
[1m[36mFixture Insert (1.0ms)[0m [1mINSERT INTO "parents" ("id") VALUES (1024804656)[0m
|
|
1267
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "parents" ("id") VALUES (1002356086)
|
|
1268
|
+
[1m[36m (2.6ms)[0m [1mCOMMIT[0m
|
|
1269
|
+
[1m[35m (2.6ms)[0m ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "parents" ENABLE TRIGGER ALL;ALTER TABLE "children" ENABLE TRIGGER ALL
|
|
1270
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
1271
|
+
----------------------------------------------------------
|
|
1272
|
+
DestroyTest: test_destroyed_without_foreign_key_constraint
|
|
1273
|
+
----------------------------------------------------------
|
|
1274
|
+
[1m[35mParent Load (0.2ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1002356086]]
|
|
1275
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
|
1276
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
1277
|
+
[1m[36mSQL (0.8ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1002356086]]
|
|
1278
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
1279
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
|
1280
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
|
1281
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
1282
|
+
----------------------------------------------------------------------
|
|
1283
|
+
DestroyTest: test_foreign_key_constraint_converted_to_validation_error
|
|
1284
|
+
----------------------------------------------------------------------
|
|
1285
|
+
[1m[35mParent Load (0.2ms)[0m SELECT "parents".* FROM "parents" WHERE "parents"."id" = $1 LIMIT 1 [["id", 1024804656]]
|
|
1286
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
|
1287
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
1288
|
+
[1m[36mSQL (0.8ms)[0m [1mDELETE FROM "parents" WHERE "parents"."id" = $1[0m [["id", 1024804656]]
|
|
1289
|
+
PG::ForeignKeyViolation: ERROR: update or delete on table "parents" violates foreign key constraint "fk_rails_2d768a42d4" on table "children"
|
|
1290
|
+
DETAIL: Key (id)=(1024804656) is still referenced from table "children".
|
|
1291
|
+
: DELETE FROM "parents" WHERE "parents"."id" = $1
|
|
1292
|
+
[1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
|
1293
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "parents"[0m
|
|
1294
|
+
[1m[35m (0.4ms)[0m ROLLBACK
|
|
1295
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
|
1296
|
+
-------------------------------------------------------------------
|
|
1297
|
+
SaveTest: test_foreign_key_constraint_converted_to_validation_error
|
|
1298
|
+
-------------------------------------------------------------------
|
|
1299
|
+
[1m[35mChild Load (0.3ms)[0m SELECT "children".* FROM "children" WHERE "children"."id" = $1 LIMIT 1 [["id", 980190962]]
|
|
1300
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
1301
|
+
[1m[35mSQL (0.5ms)[0m UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2 [["parent_id", 221917195], ["id", 980190962]]
|
|
1302
|
+
PG::ForeignKeyViolation: ERROR: insert or update on table "children" violates foreign key constraint "fk_rails_2d768a42d4"
|
|
1303
|
+
DETAIL: Key (parent_id)=(221917195) is not present in table "parents".
|
|
1304
|
+
: UPDATE "children" SET "parent_id" = $1 WHERE "children"."id" = $2
|
|
1305
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
|
1306
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: unconstrained
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexandros Giouzenis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-02-
|
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|