errepb13520
errepb13520

Hello to october users/fans, could you please help me with my question?

I want to run new migration for my custom plugin. I know we can use php artisan plugin:refresh to run all the updates from version.yaml, but it will recreate the table so my data on the server will be removed. I just want to run the particular migration that will add only one column to existing table. Is there any way to do this?

Thanks!

Crazymodder
Crazymodder

Simply write a new migration and add you coloums and than migrate this:)

errepb13520
errepb13520

For sure I have the migration where the columns are added. The question is what command should I use to run this migration. "... than migrate this" - what is the command?

bayram4ik
bayram4ik

I never did that, but probably you can find the answer in rainlab.builder's code, path to the file rainlab/builder/classes/MigrationModel.php

Shantarli
Shantarli

php artisan october:up

samanthush24597
samanthush24597

php artisan plugin:refresh AuthorName.PluginName

KurtJensen
KurtJensen

You can simply log-out of the backend and then back in to trigger the new version migration.

Caution!

As you mention in your original question, php artisan plugin:refresh will destroy all existing data.

oleg.nasteka52799
oleg.nasteka52799

samanthush24597 said:

php artisan plugin:refresh AuthorName.PluginName

Thanks!

1-8 of 8