Ruby Padrino framework migration command randomly deleted wrong file, how could this be?

66 Views Asked by At

I am building a web application using Padrino and sequel as ORM. I mistyped Padrino migration command for model generation, and as you can see in the screenshot, the wrong command ended up generating a nameless migration file db/migrate/041_g.rb. I then wanted to delete this wrong file using by using the same mistyped command with -d at the end of the command for deleting the generated file, I surprisingly ended up with a random deletion of one of my project migration files that has nothing to do with the command i just ran

nxn@debian:~/PRODUCTION/tubes$ padrino g migration g model AccountAthorizedPayment uuid:string account_id:int payment_provider_id:int authorisation_status:string created_at:datetime updated_at:timestamp
   apply  orms/sequel
  create  db/migrate/041_g.rb

nxn@debian:~/PRODUCTION/tubes$ padrino g migration g model AccountAthorizedPayment uuid:string account_id:int payment_provider_id:int authorisation_status:string created_at:datetime updated_at:timestamp -d
   apply  orms/sequel
  remove  db/migrate/008_add_channel_profile_image_to_order.rb
  nxn@debian:~/PRODUCTION/streamtubes$ 

Screenshot of Padrino commands

Anyone ever faced this issue? any explanation about this random behavior?

0

There are 0 best solutions below