I extended the user's plugin going by the tutorial and it works ok. Now i want to add new fields using the same plugin i created for the extension by adding this as an additional file in the updates folder
<?php namespace Corymillz\Store\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class AddNewFeilds extends Migration
{
public function up()
{
Schema::table('users', function($table)
{
$table->string('store_title_font')->nullable();
$table->string('store_title_font_color')->nullable();
$table->string('store_description_font')->nullable();
$table->string('store_description_font_color')->nullable();
$table->string('background_size')->nullable();
});
}
public function down()
{
Schema::table('users', function($table) {
$table->dropColumn([
'store_title_font',
'store_title_font_color',
'store_description_font',
'store_description_font_color',
'background_size',
]);
});
}
}
What i am not clear about or scared to try is what happens when i run php artisan plugin:refresh. Will
the first table be dropped and rebuilt with the data saved in it deleted? or is there a different way of adding new fields to the already extended fields.
I extended the user's plugin going by the tutorial and it works ok. Now i want to add new fields using the same plugin i created for the extension by adding this as an additional file in the updates folder
What i am not clear about or scared to try is what happens when i run php artisan plugin:refresh. Will the first table be dropped and rebuilt with the data saved in it deleted? or is there a different way of adding new fields to the already extended fields.