mosh-hamedani / issue-tracker

https://issue-tracker-pied.vercel.app
214 stars 99 forks source link

Error: P3009 occured while Deployment #8

Closed omunite215 closed 8 months ago

omunite215 commented 8 months ago

This is the error message I found in logs


This works fine in development stage


Link to my Repository
migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
-- 10:51:22.825 | The `20240103141052_initial_migration` migration started at 2024-01-03 14:43:44.742 UTC failed
I tried many solutions as checking code and creating migration again but it didn't worked. Please help me fix this.
omunite215 commented 8 months ago

This is the error message I found in logs

This works fine in development stage

Link to my Repository migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve -- 10:51:22.825 | The 20240103141052_initial_migration migration started at 2024-01-03 14:43:44.742 UTC failed I tried many solutions as checking code and creating migration again but it didn't worked. Please help me fix this.

I tried disabling Require Primary key in the service settings and it worked!!

omunite215 commented 8 months ago

Hello!!

This error mainly occurs when you attempt to push your local changes to GitHub while the local repository (repo) has not yet been updated with any changes made in the remote repo.

So Git is trying to tell you to update the local repo with the current changes in the remote before pushing your own changes. This is necessary so that you don't override the changes made by others.

There are two ways to fix this:-

Solution-1: use git pull to merge changes of your github repo

Solution-2: use git push —force this will force the files of your local files to overwrite of that on your github repository.

Want to know more? Check this guide at free code camp

https://www.freecodecamp.org/news/error-failed-to-push-some-refs-to-how-to-fix-in-git/

Hope this helps!! Thanks.

On Fri, 5 Jan 2024 at 3:42 AM, Miguel Pinto @.***> wrote:

Hello! Maybe you can help me. I also had the same problem. But I tried to do the deployment before I got to the end of the tutorial.

Before that, I have a problem when I run a remo from the environment file with Python. When I execute "push", I get an error message on the console: "! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/MiketheBite/issue-tracker.git' hint: Updates were rejected because the remote contains work that you do not hint: have locally. This is usually caused by the fact that another repository has pushed the same reference hint:. If you want to integrate the changes remotely, use hint: 'git pull' before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details."

Do you have any idea why?

— Reply to this email directly, view it on GitHub https://github.com/mosh-hamedani/issue-tracker/issues/8#issuecomment-1877829489, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASYJD42SP7UHBGUCL4FMXUDYM4SLHAVCNFSM6AAAAABBMM3BS2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXHAZDSNBYHE . You are receiving this because you modified the open/close state.Message ID: @.***>

--

Warning and  Disclaimer :  This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your mailbox . 

Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. 

Email transmission can' t be guaranteed to be secure or error-free, as information could be intercepted, corrupted, lost, destroyed, arrived  late or incomplete or contains  viruses. The sender, therefore, does not accept liability for any damage which arise as a result of email transmission.