active_retention 0.1.0 → 0.1.1

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: c34ad200a2c7661837737e32419ab22ab39cb6952e4490a546bb46b7b4e7cb79
4
- data.tar.gz: de5471837bdbc5f1288cd406cc7945622806d46ed2f6291715c9da39d69767ce
3
+ metadata.gz: db50f82083319bbf255c91265f2f31263fd74a098908cef0dbb21ef4b0331a37
4
+ data.tar.gz: 79e120a803a87ad76ab6dad9330885da1e7b2bce98ae0cb691a596d45d486c10
5
5
  SHA512:
6
- metadata.gz: 54347af50f9f13332ea1188767915aa2acefc45729e3fb084d6236b504742f0e01e6488f4ec3e4e01ff8ad8121b604db7287e51ad107d38d1daafafa59ffcd3a
7
- data.tar.gz: 74bf0c70bb22406d5e8350ba3953424d24d0fc2b786114325f9ca0fb612f62db7ae16cd529deaedf432b2eab53960b941363f28a9b55e5abc57023749d70fdcf
6
+ metadata.gz: 4626327e4b7229aab844ac3f8e1ff366b0facd000cba1c436dcedbcee4b0de055209209657346bb5a1c3f242391ac63789748b4724a05da48f18a53956d1ce58
7
+ data.tar.gz: 7b376d4df2acebf2a25ca832e26eaf22a855be10ff3ce3ba3b755f9895cca18bc03c7c90bfe67bde80a867e5178319413f49a4fdc1d34b6a832b6866c449ca65
@@ -1,3 +1,3 @@
1
1
  module ActiveRetention
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -2,7 +2,16 @@ class Create<%= @archive_table_name.camelize %> < ActiveRecord::Migration[<%= Ac
2
2
  def change
3
3
  create_table :<%= @archive_table_name %>, id: :bigserial do |t|
4
4
  <% model_columns.each do |column| -%>
5
- t.<%= column.type %> :<%= column.name %><%= ", limit: #{column.limit.inspect}" unless column.limit.nil? %><%= ", precision: #{column.precision.inspect}" unless column.precision.nil? %><%= ", scale: #{column.scale.inspect}" unless column.scale.nil? %><%= ", null: #{column.null}" unless column.null %>
5
+ <% options = [] -%>
6
+ <% options << "limit: #{column.limit.inspect}" unless column.limit.nil? -%>
7
+ <% options << "precision: #{column.precision.inspect}" unless column.precision.nil? -%>
8
+ <% options << "scale: #{column.scale.inspect}" unless column.scale.nil? -%>
9
+ <% options << "null: #{column.null}" unless column.null -%>
10
+ <% if options.any? -%>
11
+ t.<%= column.type %> :<%= column.name %>, <%= options.join(', ') %>
12
+ <% else -%>
13
+ t.<%= column.type %> :<%= column.name %>
14
+ <% end -%>
6
15
  <% end -%>
7
16
  t.datetime :archived_at, null: false, default: -> { 'CURRENT_TIMESTAMP' }
8
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_retention
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray West