Enable to save without updating timestamps #58

Merged
merged 1 commit into from Aug 18, 2016

Projects

None yet

3 participants

@cignoir
Contributor
cignoir commented Mar 16, 2016

Enable to configure that as below:

Dynamoid.configure do |config|
  config.timestamps = false # default: true
end
@cignoir cignoir Enable to save without updating timestamps
6eb09aa
@philipmw
Member

Hi, @cignoir, thanks for your contribution. What's the use case for this option?

@cignoir
Contributor
cignoir commented Mar 30, 2016 edited

Hi, @philipmw

I want to disable timestamps because of following reasons.

  • I want to use Dynamoid for legacy tables which have no timestamps
  • Timestamps increase the cost of storage, whether or not an application needs them
  • Timestamps can make table definitions dirty
    • Imagine using Dynamoid with an existing table which already have 'create_time' (not 'created_at')

For the above reasons, I think timestamps should be removable.

@cignoir
Contributor
cignoir commented Aug 8, 2016 edited

Iโ€™d like to ask if someone could review. Thanks.

@pboling
Collaborator
pboling commented Aug 18, 2016

This is great!

@pboling pboling merged commit 3345794 into Dynamoid:master Aug 18, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
coverage/coveralls Coverage increased (+0.08%) to 95.269%
Details
@pboling
Collaborator
pboling commented Aug 18, 2016

@cignoir this will be in the next release, and until then you can point at master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment