canvas_sync 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/apartment.rb +10 -6
- data/lib/canvas_sync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a57e57d039eb1106619e3cd1019942b7a51e707df471cc7e8c46fe69840189ba
|
4
|
+
data.tar.gz: 0702bf4968ffe18532759d0c6a03d7e6ca73eb0a23b675825ee12939325e9f33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46f2fde7c43f048bfe531116311f8794da7f27a3de4cd31efda024a08f7421f77b3b95fd84fb31067fa62a4b4d4ac12e44b923f45bc61bed37e10bddea1ab2cf
|
7
|
+
data.tar.gz: ea5acb8a77a3a187dabe416b4d6debdd52f10e3c4b4136e7958988868af97734c79498faaec8046dd5cdb0c34cda24095cb1184f4695cee0a95978b5ffb40dcd
|
@@ -5,12 +5,16 @@
|
|
5
5
|
# * https://github.com/influitive/apartment/issues/508
|
6
6
|
|
7
7
|
Rails.application.config.after_initialize do
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
begin
|
9
|
+
Rails.application.eager_load!
|
10
|
+
ActiveRecord::Base.descendants.each do |model|
|
11
|
+
seq_name = model.sequence_name
|
12
|
+
if seq_name.present?
|
13
|
+
tenant, seq_name = seq_name.include?(".") ? seq_name.split(".") : [nil, seq_name]
|
14
|
+
model.sequence_name = seq_name if tenant != "public"
|
15
|
+
end
|
14
16
|
end
|
17
|
+
rescue PG::ConnectionBad
|
18
|
+
# no-op if there is no database setup
|
15
19
|
end
|
16
20
|
end
|
data/lib/canvas_sync/version.rb
CHANGED