Hello everyone, I would like to add a new attribute to the oc_deck_cards table in the Deck app.
I get the error message:
In MigrationService.php line 370:
The version Version_AddMilestoneToDeckCards is unknown.
migrations:execute <application> <version>
My migration file (/lib/Migration/Version_AddMilestoneToDeckCards.php) looks like this:
use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
class Version_AddMilestoneToDeckCards extends SimpleMigrationStep {
public function changeSchema(IOutput $output, ISchemaWrapper $schema, array $options) {
// Retrieve the ‘oc_deck_cards’ table
$table = $schema->getTable(‘oc_deck_cards’);
// Add a new column ‘milestone’ of type ‘varchar(255)’ to the table
$table->addColumn(‘milestone’, ‘string’, [
‘length’ => 255,
‘notnull’ => false, // Optional field
]);
// Return of the changed schema
return $schema;
}
}
Can anyone help me?