I'm facing a new problem now. I see that, in most extensions, you don't need to run php flarum migrate
to execute the migrations. How can i do that? I read somewhere on the forum that migrations runs automatically, but isn't working to me. I tried to enable/disable / reinstall / clear cache / check logs (after clearing them) but nothing. No errors. I'm imploding. php flarum migrate
says nothing to migrate and php flarum migrate:reset --extension=vendor-name
says Migration file should contain an array with up/down.
2020_07_11_000000_add_example_column.php
<?php
use Flarum\Database\Migration;
return Migration::addColumns('users', [
'example' => ['string', 'length' => 36, 'nullable' => true]
]);
I tried with php flarum cache:clear
too but nothing changes.
EDIT: I edited the file name of the migration file and after executing php flarum migrate
appeared Migrated: {file_name}
and also the column appeared into the database. But the php flarum migrate:reset
is not working, keep telling me Migration file should contain an array with up/down. and also, if i remove the extension, the column is still in the database.
am i misunderstanding?