activerecord-postgres_enum 2.0.1 → 2.0.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4658a60bc93da30adf1d9cb7d2f6fce18521c2bfb063ff822c51b69d2e1f9d34
|
4
|
+
data.tar.gz: 661cde0de2e935c4d2e67e51282073faafd5991b6391e2a4e09669ba3711a6e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c880fa8bb243ea447630342c78e272839fbc961b694ec6610b46987ead637d64b5cb29d87550a18c0b654ca17e6afd84511ea7c6a813ab3657e3ab4fb1408f66
|
7
|
+
data.tar.gz: 542a619f5c41b67242aa379524588bb31b1d430d30e9f007244813c6b2ba746d3615a756bd932532a22a2555827f360768e91aadbcff3a814b874ae1c62a4367
|
data/README.md
CHANGED
@@ -36,7 +36,7 @@ create_table :person do
|
|
36
36
|
end
|
37
37
|
```
|
38
38
|
|
39
|
-
Running the above will create a table :person, with a column :person_mood of type :mood. This will also be saved on schema.rb so that `rake schema:load` works as expected.
|
39
|
+
Running the above will create a table :person, with a column :person_mood of type :mood. This will also be saved on schema.rb so that `rake db:schema:load` works as expected.
|
40
40
|
|
41
41
|
To drop an existing enum:
|
42
42
|
|
@@ -22,8 +22,12 @@ module ActiveRecord
|
|
22
22
|
statements << " create_enum #{name.inspect}, [\n#{values}\n ], force: :cascade"
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
|
-
|
25
|
+
# Check if there any enum types to dump - otherwise don't output
|
26
|
+
# anything to prevent empty lines in schema.rb
|
27
|
+
if statements.any?
|
28
|
+
stream.puts statements.join("\n\n")
|
29
|
+
stream.puts
|
30
|
+
end
|
27
31
|
end
|
28
32
|
end
|
29
33
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-postgres_enum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Merkushin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
168
|
requirements:
|
169
169
|
- - ">="
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
version: '2.
|
171
|
+
version: '2.7'
|
172
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
173
|
requirements:
|
174
174
|
- - ">="
|