cequel 3.0.4 → 3.1.0

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: 6b2ad23f8a516eb2960f68a69b5d33d87ba81b99
4
- data.tar.gz: 794306c91044e4e766694c0f029a3eba596e5552
3
+ metadata.gz: 8997183e82dc1c78a6bf30f6abbb311802ff4d37
4
+ data.tar.gz: c97d4925764150e9bd7ec574ecc0bc1500752196
5
5
  SHA512:
6
- metadata.gz: 68ae5930111f56d55bdedcef4e1999d21483e6c2a223961f5a249b05f9f4b25ee966e88cc7f4092276e0fb5e6b76769b285abd979cb340c0c35c4b8dab51aa78
7
- data.tar.gz: a5ca1b83b34b2b6a00ebfa9bed2e075ebe4e569f0254563e6d5c432c25f1c51d01bb1e2ea536c58ac89635b727909d5c8d28ad4777f32cc9e43f70c8d820d131
6
+ metadata.gz: 568edad894b06c8fb5092e7db1c6e5cee98fdb8e06f61c452f769ea5d057895b0075f8e62a916f47bb36edec35e2c3e0f2e3ab894a1256a86c95b3f9cb8b8746
7
+ data.tar.gz: 10d23590a90648be41f774ca525ca911d37c63ef4c9d1c54ef1b9102a01318b722dd7c398306254c0819f0874f56afba44456251d301ae012e0c8428ba079260
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.1.0
2
+ - Can now drop columns (https://github.com/cequel/cequel/pull/398)
3
+
1
4
  ## 3.0.4
2
5
  - support ruby 2.5 and rails 5.2 (https://github.com/cequel/cequel/pull/401)
3
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cequel (3.0.4)
4
+ cequel (3.1.0)
5
5
  activemodel (>= 4.0)
6
6
  cassandra-driver (~> 3.0)
7
7
 
@@ -97,6 +97,15 @@ module Cequel
97
97
  add_stmt %Q|ALTER TABLE "#{table_name}" RENAME "#{old_name}" TO "#{new_name}"|
98
98
  end
99
99
 
100
+ # Remove a column
101
+ #
102
+ # @param name [Symbol] the name of the column to remove
103
+ # @return [void]
104
+ #
105
+ def drop_column(name)
106
+ add_stmt %Q|ALTER TABLE "#{table_name}" DROP "#{name}"|
107
+ end
108
+
100
109
  #
101
110
  # Change one or more table storage properties
102
111
  #
@@ -67,6 +67,12 @@ module Cequel
67
67
  #
68
68
  def_delegator :@updater, :rename_column
69
69
 
70
+ # @!method drop_column(name)
71
+ # (see Cequel::Schema::TableUpdater#drop_column)
72
+ #
73
+ def_delegator :@updater, :drop_column
74
+ alias_method :remove_column, :drop_column
75
+
70
76
  #
71
77
  # @!method change_properties(options)
72
78
  # (see Cequel::Schema::TableUpdater#change_properties)
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Cequel
3
3
  # The current version of the library
4
- VERSION = '3.0.4'
4
+ VERSION = '3.1.0'
5
5
  end
@@ -151,7 +151,6 @@ describe Cequel::Schema::TableUpdater do
151
151
 
152
152
  describe '#drop_column' do
153
153
  before do
154
- pending 'Support in a future Cassandra version'
155
154
  cequel.schema.alter_table(table_name) do
156
155
  drop_column :body
157
156
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mat Brown
@@ -27,10 +27,11 @@ authors:
27
27
  - Long On
28
28
  - Lucas Mundim
29
29
  - William Flanagan
30
+ - Inaki Lanusse
30
31
  autorequire:
31
32
  bindir: bin
32
33
  cert_chain: []
33
- date: 2018-11-04 00:00:00.000000000 Z
34
+ date: 2018-11-14 00:00:00.000000000 Z
34
35
  dependencies:
35
36
  - !ruby/object:Gem::Dependency
36
37
  name: activemodel