-
Notifications
You must be signed in to change notification settings - Fork 206
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
rake db:migrate does not work #703
Comments
Is this on |
Yes its on the main branch
On Jun 17, 2019 6:26 PM, Álax de Carvalho Alves <notifications@github.com> wrote:
Is this on main branch?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#703?email_source=notifications&email_token=AHGMLDDGCF3IYR2FUURVEM3P26CYLA5CNFSM4HYQZZVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX3CO5Q#issuecomment-502671222>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHGMLDCSQFHSKU3DFPUXF4TP26CYLANCNFSM4HYQZZVA>.
|
Weird, so this might be coming from |
I think the problem here is with some specific migration file. Because here I can run |
Which branch could I pull to replicate this? @alaxalves |
Hi @cesswairimu |
Has this been fixed? @kaustubh-nair @cesswairimu |
Hi all, what's the latest with this? Thank you! |
Solved in #891. @kaustubh-nair @alaxalves please verify. Thank you! |
Reopening this because I'm still facing this. The error is the same as mentioned above |
Aha, so @sashadev-sky was addressing this in #959 but actually we should not edit migrations in the past -- they're kind of like version tracking... and any migration already run on a live instance of the app should be considered permanent. Any changes should be added to a new migration - which is why they have timestamps. Does that make sense? So that means these changes to old migrations will cause trouble in any live instance of the app: https://github.com/publiclab/mapknitter/pull/959/files#diff-1bb55a2824cab57e594057f2563e58a9L8 But! There is a solution. We can add/remove defaults and make changes using this syntax: So, instead of those migration changes, let's make all the necessary changes in a new migration with a new timestamp. Then people will be able to build a dev database from it with Does that work for folks? Thank you! |
While running migrations for the first time, the migrations fail. A workaround for this is to use
rake db:setup
but it's a good idea to have clean migration files.The text was updated successfully, but these errors were encountered: