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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 076c6682db8052bfab667c3d27ddd35e8a6daa8f
4
- data.tar.gz: 53255b3a65cec12c7e71657e9773f73ed56dd1db
3
+ metadata.gz: d4b56187f601f3215ff69db3d76564a5a7716c4e
4
+ data.tar.gz: ac750f2650db6a8859941c39fdb86c9b7a3a990c
5
5
  SHA512:
6
- metadata.gz: 7eef2c5835ba0ef9aadc57c96e520630adb2d50ca31cc762ff5d575f75c51e263aa8a23a5123e4009156e02e6166542bd64773b9bdcbaadc32af4e6544a721b6
7
- data.tar.gz: 57417ce8ffe02b7641ec3dd38b4b5e7346a10d40068fc02d4d94ffa263073a1efd0c6776f7e99e2e1499b4a150e4fc443c35355f876afd00aa67716295dd4051
6
+ metadata.gz: be20c56187a53a29bd7c6bdf1c45628d1d3c05c3483fe2aaae019d5971a961cfeb7aac9eb6a7aecdb7ab3411f0c96dbbc28992152c31f3cc98be675088a33ad6
7
+ data.tar.gz: f7c0afb90ee0a933b1d0098b9449a1a653009022912a2c24f34aa62f618ece36f2befc0ce09f2530e34f853eeee8084ee079188e5353f3fe0c6e6e2e0553e56d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
@@ -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 #{fk_constraints.collect(&:name).join(',')} DEFERRED")
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")
@@ -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.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"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml_db_with_schema_tables
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Wiggins