Skip to content

Conversation

@jkeuhlen
Copy link
Contributor

@jkeuhlen jkeuhlen commented Jul 31, 2025

I think the README update is a decent description of what I'm trying to achieve here:

You can also use the `--ignore-on-update` flag to mark columns that should be ignored during subsequent imports (useful for timestamps that shouldn't change):

# Export all data but ignore created_at and updated_at columns during updates
ripoff-export --ignore-on-update created_at --ignore-on-update updated_at /path/to/export

This adds a `~ignore_on_update` metadata field to rows containing the specified columns. During import, these columns will be included for new rows but ignored when updating existing rows, preventing timestamp-only changes from triggering unnecessary updates.

Generally, when using ripoff I tend to do the following:

  • Work on a feature in my normal way.
  • When a feature is finished, I want to persist the locally created DB state as my known "good" state for future development.
  • run ripoff-export and do any manual tweaks that are needed.
  • In the future, I can run ripoff db/fake-data to reset to my known good state for development.

One annoying thing (that this PR attempts to solve) is that I use created_at/updated_at timestamps on every table in my database so each ripoff-export invocation touches every table definition in my saved dataset.

To keep the diffs more minimal, --ignore-on-update provides a way to skip specifically named columns (that, in this case repeat across tables).

.vscode
tmp
/ripoff
/ripoff-export
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just ignoring the other executable this builds.

@jkeuhlen
Copy link
Contributor Author

Going to take another pass at this from a different direction (excluding certain fields on export entirely)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant