brut 0.0.22 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd34f0c36841cfa4f7581c356ccee9ee1a367a996570625ae841e059fffc2200
4
- data.tar.gz: f4c28ac9d7048f22457899e12bd3179037260c0544c2137410882358296cfcf8
3
+ metadata.gz: 661bfefb9cded225579d7faae56e20458a403a26e2d336c7cd6c6c7cba832b4d
4
+ data.tar.gz: d09d29af185d03035d0f4256bc1d42f784c3b7ad3f6f0aadb8caf3fa41464c44
5
5
  SHA512:
6
- metadata.gz: 3a653b7120c79c7ab53813ea24a6aa5dac5e01a7604584f83630a929ec3c98e37360cd0a18b7aaac61c6539829a345e563b0bcb8bae3ecc330580badfc745d5c
7
- data.tar.gz: c014770352ac1b0276cc0365ca477c5d0bc6df6a4ec1123fe4db97cf1a57b38f1eb1655a01ed5710ac190d0601e0681258403ea22356ee90a284b9c39b7da003
6
+ metadata.gz: a942224c334d13e01f869f75ec80aaa0cf46089d5d93c39ad9e297d5518d28f1487ba028e47bd9dea745503a9a34becdb458ef00c485759930a099182f3f1e47
7
+ data.tar.gz: 9264c21ebd224c64c73d157b54020e2cab1f0c2779d5b9df8cd34746a08aa0b62b6898941df49d53ca8ddb9b93066b7e723e9775917e3a551decbdbbe4f8000f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brut (0.0.22)
4
+ brut (0.0.23)
5
5
  concurrent-ruby
6
6
  i18n
7
7
  irb
data/lib/brut/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Brut
2
2
  # @!visibility private
3
- VERSION = "0.0.22"
3
+ VERSION = "0.0.23"
4
4
  end
@@ -18,16 +18,19 @@ module Sequel
18
18
  def create_table(*args)
19
19
  super
20
20
 
21
+
21
22
  if args.last.is_a?(Hash)
22
- if args.last[:comment]
23
- run %{
23
+ if name != "schema_migrations" && name != "schema_info"
24
+ if args.last[:comment]
25
+ run %{
24
26
  comment on table #{args.first} is #{literal args.last[:comment]}
25
- }
26
- elsif args.first != "schema_info"
27
- raise ArgumentError, "Table #{args.first} must have a comment"
28
- end
29
- if args.last[:external_id]
30
- add_column args.first, :external_id, :citext, unique: true
27
+ }
28
+ else
29
+ raise ArgumentError, "Table #{args.first} must have a comment"
30
+ end
31
+ if args.last[:external_id]
32
+ add_column args.first, :external_id, :citext, unique: true
33
+ end
31
34
  end
32
35
  end
33
36
  end
@@ -52,7 +55,7 @@ module Sequel
52
55
  end
53
56
 
54
57
  def create_table_from_generator(name, generator, options)
55
- if name != "schema_migrations"
58
+ if name != "schema_migrations" && name != "schema_info"
56
59
  if generator.columns.none? { |column| column[:primary_key] }
57
60
  generator.primary_key :id
58
61
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Bryant Copeland