-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid snapshots state #103
Comments
Ah.. it looks like the snapshots are broken because someone else introduced a change on the same resource (without a git conflict). This mechanism is a pain because it is pretty hard to fix the state later :/ |
Why do we even need the snapshots? Can't we rely on migrations only? |
I had to apply this: diff --git a/elixir/lib/[filtered]/resources/user/referral_reward.ex b/elixir/lib/[filtered]/resources/user/referral_reward.ex
index 0b5adff8..dacb0294 100644
--- a/elixir/lib/[filtered]/resources/user/referral_reward.ex
+++ b/elixir/lib/[filtered]/resources/user/referral_reward.ex
@@ -33,7 +33,8 @@ defmodule [filtered].Resources.User.ReferralReward do
attribute :fulfilled, :boolean, allow_nil?: false, default: false
- timestamps()
+ create_timestamp :inserted_at
+ update_timestamp :updated_at
end
aggregates do and regenerate snapshots manually to fix the state. |
Those should ultimately be the same thing, likely just regenerating fixed it. |
#75 this issue should resolve the issues around conflicts when using the migration generator in parallel with others. |
Describe the bug
After upgrading Ash from 1.52.0-rc.11 to 15cd3fb7bcc6968ff1ae40a7589b068ea686e328:
The migration generator breaks the snapshots of already migrated resources (see the output in "expected behavior").
To Reproduce
Not sure.
Expected behavior
It should not (1) try to rename the timestamps, and definitely (2) should not do that if I type
n
while generating the migration (note thesource: null
in the snapshot):** Runtime
Additional context
ash-project/ash#344
#102
The text was updated successfully, but these errors were encountered: