shameless 0.3.0 → 0.3.1

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: ffc551d90e92b4f9174e15573bfdefb8a327c20f
4
- data.tar.gz: 4e721f69cad576d714069eb2cdb281c13e98d256
3
+ metadata.gz: db3835f5ef9ce405fa408144ae0b8fa3953a064c
4
+ data.tar.gz: f790d5e4fd1e299839e662888fcfe43954352307
5
5
  SHA512:
6
- metadata.gz: 2ea84086ac343ccba0b8a44c5c257dfa02130355ffc5efd71dee633db5df9cc6631b15c8d2e24999bf1f211d663caf694664d9e2c5b561708aedd43d91769e1a
7
- data.tar.gz: 9d939c4abd011c615cdda23894dd0e82459304b88a487d57de11006f100c3ac0b791fada345520cd6c8d2227e3352d937f69ceb4f1ab379e498d859cf8c8fa1d
6
+ metadata.gz: dde37619a76132a7ef7adcfbe9dd00d0daeaf96a582acfdb582e2f05c35d619191620587cacd9a9fb08796aae2b47c5c1118144ae52a5047bf72cc3901c788e9
7
+ data.tar.gz: 7753aa09027ae4627fa8b5bae6bff44b5f9e68cff2975f109276a36de22a75b800ab6ab0415ae8ac7dac63038ad249c6aaf0e990b0a2b83709fb2f0c0946071a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.3.1 (2016-11-18)
2
+
3
+ * Use more static names for underlying database indices
4
+ * Use database-portable data types for index columns
5
+
1
6
  ### 0.3.0 (2016-11-18)
2
7
 
3
8
  * Add `Cell#uuid`
@@ -12,10 +12,10 @@ module Shameless
12
12
  instance_eval(&block)
13
13
  end
14
14
 
15
- DataTypes = %i[integer string]
15
+ DataTypes = {integer: Integer, string: String}
16
16
 
17
- DataTypes.each do |type|
18
- define_method(type) do |column|
17
+ DataTypes.each do |name, type|
18
+ define_method(name) do |column|
19
19
  self.column(column, type)
20
20
  end
21
21
  end
@@ -68,7 +68,7 @@ module Shameless
68
68
 
69
69
  t.varchar :uuid, size: 36
70
70
 
71
- t.index @columns.keys, unique: true
71
+ t.index @columns.keys, name: "#{table_name}_index", unique: true
72
72
  end
73
73
  end
74
74
 
@@ -85,7 +85,7 @@ module Shameless
85
85
  created_at_type = @store.configuration.legacy_created_at_is_bigint ? :bigint : :datetime
86
86
  t.column :created_at, created_at_type, null: false
87
87
 
88
- t.index %i[uuid column_name ref_key], unique: true
88
+ t.index %i[uuid column_name ref_key], name: "#{table_name}_model", unique: true
89
89
  end
90
90
 
91
91
  @indices.each(&:create_tables!)
@@ -1,3 +1,3 @@
1
1
  module Shameless
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shameless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olek Janiszewski