yaml_db_with_schema_tables 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/serialization_helper.rb +1 -3
- data/yaml_db.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4b56187f601f3215ff69db3d76564a5a7716c4e
|
4
|
+
data.tar.gz: ac750f2650db6a8859941c39fdb86c9b7a3a990c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be20c56187a53a29bd7c6bdf1c45628d1d3c05c3483fe2aaae019d5971a961cfeb7aac9eb6a7aecdb7ab3411f0c96dbbc28992152c31f3cc98be675088a33ad6
|
7
|
+
data.tar.gz: f7c0afb90ee0a933b1d0098b9449a1a653009022912a2c24f34aa62f618ece36f2befc0ce09f2530e34f853eeee8084ee079188e5353f3fe0c6e6e2e0553e56d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.4
|
data/lib/serialization_helper.rb
CHANGED
@@ -125,17 +125,15 @@ module SerializationHelper
|
|
125
125
|
case database_type
|
126
126
|
when :postgresql
|
127
127
|
# make all fk constraints deferrable
|
128
|
-
fk_constraints = []
|
129
128
|
tables.each do |table|
|
130
129
|
fk_constraints_on_table = ActiveRecord::Base.connection.foreign_keys(table)
|
131
130
|
fk_constraints_on_table.each do |fk_constraint|
|
132
131
|
quoted_table_name = SerializationHelper::Utils.quote_table(table)
|
133
132
|
ActiveRecord::Base.connection.execute("ALTER TABLE #{quoted_table_name} ALTER CONSTRAINT #{fk_constraint.name} DEFERRABLE INITIALLY IMMEDIATE")
|
134
133
|
end
|
135
|
-
fk_constraints += fk_constraints_on_table
|
136
134
|
end
|
137
135
|
# defer all fk constraints
|
138
|
-
ActiveRecord::Base.connection.execute("SET CONSTRAINTS
|
136
|
+
ActiveRecord::Base.connection.execute("SET CONSTRAINTS ALL DEFERRED")
|
139
137
|
yield block
|
140
138
|
when :mysql
|
141
139
|
ActiveRecord::Base.connection.execute("SET foreign_key_checks = 0")
|
data/yaml_db.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "yaml_db_with_schema_tables"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Adam Wiggins", "Orion Henry", "Martin Honermeyer"]
|