scandipwa / create-magento-app

A zero-configuration tool-chain which allows to deploy Magento 2 application in minutes!
https://docs.create-magento-app.com
Open Software License 3.0
32 stars 20 forks source link

[import-db script] Set 'skip this step' option first in database deletion prompt #125

Closed tarasovd closed 1 year ago

tarasovd commented 1 year ago

Is your proposal related to a problem?

Sometimes it is necessary to import separate tables into database. In that case you don't want to delete database, though import-db script doesn't provide such option, as a result import-db script is useless for such purpose. In addition, there is no warning promt that the database will be deleted - it just deletes it, nothing about that in CMA docs as well. Quite painful if you don't have a backup.

Update: since I wasn't able to reproduce missing database deletion prompt anymore, my offer instead is to set 'skip this step' option first in prompt to avoid accidental database deletion.

Describe the solution you'd like

Set 'skip this step' option first in database deletion prompt.

ejnshtein commented 1 year ago

Isn't it already doing that? https://github.com/scandipwa/create-magento-app/blob/master/build-packages/magento-scripts/lib/tasks/database/import-dump-to-database.js#L58-L89

tarasovd commented 1 year ago

Indeed. I swear I was AFK during the import and it happened to me twice :laughing: Tried to reproduce it now several times and all the time got the promt. Kinda should've a serious talk with my cat maybe? Don't know how to explain it otherwise. Anyway, will reopen if will be reproduced again and I will have some specific scenario with missing promt.

ejnshtein commented 1 year ago

Okay 🫡

You might have used an older version of magento-scripts, but it's possible that this prompt wasn't there.

Glad it worked now 👍

tarasovd commented 1 year ago

Well, I decided to re-open it anyway. This time I offer to set 'NO, I DONT WANT' option first in promt.

ejnshtein commented 1 year ago

Okay 😅

Will do it when free time arrives for this one.

ejnshtein commented 1 year ago

I think this is done.

ejnshtein commented 1 year ago

Can you check if we can close this one?