I'm running a migration to add a new column to the user table, everything appears to have worked as intended but no new column appears in the db user table. It may be a problem to do with my inexperience, but I figure I'll post what I've got and see if someone can point me in right direction. Maybe I've misunderstood the process.
2018_02_13_000000_create_user_column.php in workbench/myextension/migrations/
<?php
use Flarum\Database\Migration;
return [
'up' => function () {
Migration::addColumns('users', [
'firstName' => ['string', 'nullable' => true],
]);
},
'down' => function() {
Migration::dropColumns('users', [
'firstName' => ['string', 'nullable' => true],
]);
}
];
Then i run php flarum migrate
and get
Migrating extension: myextension
Migrated: 2018_02_13_000000_create_user_column
I run mysql command show columns in users;
and i do not see the new column listed.
- I've cleared the cache
- Reinstalled my extension
If no answer comes to mind, confirmation of the process being correct will help me.
Thank you 😉