phcmemberspro 20.2.1 → 20.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef1417328e4b860e6dbdb0e08a595a958986899c
|
4
|
+
data.tar.gz: f0af6418d0265ce398536f6250717f404bd9a588
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f13850b869ab086a9dd609ea0457c579b6567802dea20cdcd445899cd550462ea099247f1ff4a6e661fed51e2eca178c41931404364f5442724801580235744
|
7
|
+
data.tar.gz: 6cd98fc94fdc6c9d2adf881a746f2e72802acf3131cdcc11ddb9025a2b4cf9d56c34cf449fde90907533f2e00e7b81e994211d37afe0194a2d5438ab6b6f2dd1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcmemberspro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 20.2.
|
4
|
+
version: 20.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BradPotts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -723,7 +723,6 @@ files:
|
|
723
723
|
- app/views/phcmemberspro/modules/dashboards/index.html.erb
|
724
724
|
- config/locales/en.yml
|
725
725
|
- config/routes.rb
|
726
|
-
- db/migrate/20160714193304_create_phcmemberspro_versions.rb
|
727
726
|
- db/migrate/20160728230720_create_phcmemberspro_directory_categories.rb
|
728
727
|
- db/migrate/20160728230830_create_phcmemberspro_directory_categorylistings.rb
|
729
728
|
- db/migrate/20160728230901_create_phcmemberspro_member_addresses.rb
|
@@ -1,80 +0,0 @@
|
|
1
|
-
# This migration creates the `versions` table, the only schema PT requires.
|
2
|
-
# All other migrations PT provides are optional.
|
3
|
-
class CreatePhcmembersproVersions < ActiveRecord::Migration[5.1]
|
4
|
-
# Class names of MySQL adapters.
|
5
|
-
# - `MysqlAdapter` - Used by gems: `mysql`, `activerecord-jdbcmysql-adapter`.
|
6
|
-
# - `Mysql2Adapter` - Used by `mysql2` gem.
|
7
|
-
MYSQL_ADAPTERS = [
|
8
|
-
"ActiveRecord::ConnectionAdapters::MysqlAdapter",
|
9
|
-
"ActiveRecord::ConnectionAdapters::Mysql2Adapter"
|
10
|
-
].freeze
|
11
|
-
|
12
|
-
# The largest text column available in all supported RDBMS is
|
13
|
-
# 1024^3 - 1 bytes, roughly one gibibyte. We specify a size
|
14
|
-
# so that MySQL will use `longtext` instead of `text`. Otherwise,
|
15
|
-
# when serializing very large objects, `text` might not be big enough.
|
16
|
-
TEXT_BYTES = 1_073_741_823
|
17
|
-
|
18
|
-
def change
|
19
|
-
create_table :versions, versions_table_options do |t|
|
20
|
-
t.string :item_type, item_type_options
|
21
|
-
t.integer :item_id, null: false
|
22
|
-
t.string :event, null: false
|
23
|
-
t.string :whodunnit
|
24
|
-
t.text :object, limit: TEXT_BYTES
|
25
|
-
|
26
|
-
# Known issue in MySQL: fractional second precision
|
27
|
-
# -------------------------------------------------
|
28
|
-
#
|
29
|
-
# MySQL timestamp columns do not support fractional seconds unless
|
30
|
-
# defined with "fractional seconds precision". MySQL users should manually
|
31
|
-
# add fractional seconds precision to this migration, specifically, to
|
32
|
-
# the `created_at` column.
|
33
|
-
# (https://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html)
|
34
|
-
#
|
35
|
-
# MySQL users should also upgrade to rails 4.2, which is the first
|
36
|
-
# version of ActiveRecord with support for fractional seconds in MySQL.
|
37
|
-
# (https://github.com/rails/rails/pull/14359)
|
38
|
-
#
|
39
|
-
t.datetime :created_at
|
40
|
-
end
|
41
|
-
add_index :versions, [:item_type, :item_id]
|
42
|
-
end
|
43
|
-
|
44
|
-
private
|
45
|
-
|
46
|
-
# MySQL 5.6 utf8mb4 limit is 191 chars for keys used in indexes.
|
47
|
-
# See https://github.com/airblade/paper_trail/issues/651
|
48
|
-
def item_type_options
|
49
|
-
opt = { null: false }
|
50
|
-
opt[:limit] = 191 if mysql?
|
51
|
-
opt
|
52
|
-
end
|
53
|
-
|
54
|
-
def mysql?
|
55
|
-
MYSQL_ADAPTERS.include?(connection.class.name)
|
56
|
-
end
|
57
|
-
|
58
|
-
# Even modern versions of MySQL still use `latin1` as the default character
|
59
|
-
# encoding. Many users are not aware of this, and run into trouble when they
|
60
|
-
# try to use PaperTrail in apps that otherwise tend to use UTF-8. Postgres, by
|
61
|
-
# comparison, uses UTF-8 except in the unusual case where the OS is configured
|
62
|
-
# with a custom locale.
|
63
|
-
#
|
64
|
-
# - https://dev.mysql.com/doc/refman/5.7/en/charset-applications.html
|
65
|
-
# - http://www.postgresql.org/docs/9.4/static/multibyte.html
|
66
|
-
#
|
67
|
-
# Furthermore, MySQL's original implementation of UTF-8 was flawed, and had
|
68
|
-
# to be fixed later by introducing a new charset, `utf8mb4`.
|
69
|
-
#
|
70
|
-
# - https://mathiasbynens.be/notes/mysql-utf8mb4
|
71
|
-
# - https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
|
72
|
-
#
|
73
|
-
def versions_table_options
|
74
|
-
if mysql?
|
75
|
-
{ options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci" }
|
76
|
-
else
|
77
|
-
{}
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|