brut 0.0.22 → 0.0.24

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: 66debd5e3492d152f6e1284b9d207c288b8ae4369a632a2d66c4a9c79cb32c35
4
+ data.tar.gz: 9587bfb3d5baac04b9add2fac1d5da24db0230c985162fde5216f56212d7880c
5
5
  SHA512:
6
- metadata.gz: 3a653b7120c79c7ab53813ea24a6aa5dac5e01a7604584f83630a929ec3c98e37360cd0a18b7aaac61c6539829a345e563b0bcb8bae3ecc330580badfc745d5c
7
- data.tar.gz: c014770352ac1b0276cc0365ca477c5d0bc6df6a4ec1123fe4db97cf1a57b38f1eb1655a01ed5710ac190d0601e0681258403ea22356ee90a284b9c39b7da003
6
+ metadata.gz: c977cb67e52844a531a0f865a82766fe651d3a310c8875d2e7c5206a1d07443152560323c46b2be42e93284e5d07dc05c44421cf223afd7143c6456f72f03999
7
+ data.tar.gz: 86e156145eac29a767b934da1ca0d4f6020971c100ed122963492567788d7ccf82ec9534b570871784abc893d1e98bd5795cd296dd3a3a102eec5e3b6fe11ed2
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.24)
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.24"
4
4
  end
@@ -18,16 +18,20 @@ 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 %{
24
- 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
23
+ name = args.first
24
+ if name != "schema_migrations" && name != "schema_info"
25
+ if args.last[:comment]
26
+ run %{
27
+ comment on table #{name} is #{literal args.last[:comment]}
28
+ }
29
+ else
30
+ raise ArgumentError, "Table #{name} must have a comment"
31
+ end
32
+ if args.last[:external_id]
33
+ add_column name, :external_id, :citext, unique: true
34
+ end
31
35
  end
32
36
  end
33
37
  end
@@ -52,7 +56,7 @@ module Sequel
52
56
  end
53
57
 
54
58
  def create_table_from_generator(name, generator, options)
55
- if name != "schema_migrations"
59
+ if name != "schema_migrations" && name != "schema_info"
56
60
  if generator.columns.none? { |column| column[:primary_key] }
57
61
  generator.primary_key :id
58
62
  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.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Bryant Copeland