Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Keep last modified #604

Merged
merged 15 commits into from
Dec 1, 2015
Merged

Keep last modified #604

merged 15 commits into from
Dec 1, 2015

Conversation

almet
Copy link
Contributor

@almet almet commented Nov 30, 2015

Allow to keep the last_modified header when specified in the data. Fixes #587.

@Natim
Copy link
Contributor

Natim commented Nov 30, 2015

First of all I would like to say thank you for tackling this bug so fast 👍 I was kind of afraid it would block us on the long run.

@almet
Copy link
Contributor Author

almet commented Nov 30, 2015

Still misses (on the way) tests for creation and the migrations for the SQL schema.

@@ -12,6 +12,13 @@ END;
$$ LANGUAGE plpgsql
IMMUTABLE;

CREATE OR REPLACE FUNCTION from_epoch(epoch BIGINT) RETURNS TIMESTAMP AS $$
BEGIN
RETURN TIMESTAMP WITH TIME ZONE 'epoch' + epoch * INTERVAL '1 millisecond';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this handle epoch being null?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently it does 👍

@almet
Copy link
Contributor Author

almet commented Nov 30, 2015

Just updated with the two missing bits.

# Need to delete the last_modified field of the record for it to not
# be kept (in no case we want to keep the old one).
del existing[modified_field]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Need to remove whitespaces. for flake8

almet added a commit that referenced this pull request Dec 1, 2015
@almet almet merged commit a67751e into master Dec 1, 2015
@almet almet removed the in progress label Dec 1, 2015
@almet almet deleted the keep-last-modified branch December 1, 2015 15:12
@Natim
Copy link
Contributor

Natim commented Dec 1, 2015

Youpi !!!!

leplatrem added a commit that referenced this pull request Feb 23, 2016
In PR #604, we updated the schema, but didn't bump its version. As a consequence, the migrations
were never executed.

In PR #649, we replaced the orphan migration with a new one about collection timestamps.

This commit restores the migration of #604 and puts the one of #649 into a new one.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants