Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrations configuration key "name" does not exist. #1024

Closed
shepard8 opened this issue Jun 25, 2020 · 5 comments · Fixed by #1026
Closed

Migrations configuration key "name" does not exist. #1024

shepard8 opened this issue Jun 25, 2020 · 5 comments · Fixed by #1026

Comments

@shepard8
Copy link
Contributor

Bug Report

Q A
BC Break yes/no (I don't know what BC is, sorry 😕 )
Version 3.0.1

Summary

Following the documentation, I used the following migrations.php file:

<?php return [
  'name' => 'Test Migrations',
  'table_storage' => [
    'table_name' => 'test_migrations',
    'version_column_name' => 'version',
    'version_column_length' => '1024',
    'executed_at_column_name' => 'executed_at',
    'execution_time_column_name' => 'execution_time'
  ],
  'migrations_paths' => [
    'Test\Migrations' => '/home/fabian/migrationstest/Migrations'
  ],
  'all_or_nothing' => true,
  'check_database_platform' => true
]; ?>

However when running ./vendor/bin/doctrine-migrations generate as indicated on the next page, I end up with the following error :

Migrations configuration key "name" does not exist.

Current behavior

The error shown above

How to reproduce

Just composer require 'doctrine/migrations' in some empty folder, put the migrations.php file as above, and run the command above.

Expected behavior

New migration class should be generated

This is fixed by commenting out the 'name' => 'Test Migrations', line. I guess this is just a documentation error and name is not relevant anymore, but I am completely new to doctrine migrations so I can't be sure at all.

@shepard8
Copy link
Contributor Author

According to this issue, which is related to this issue but not the same (upgrading vs main documentation), this is indeed a documentation error.

@SenseException
Copy link
Member

Looks like the name wasn't removed from Migrations while the DoctrineMigrationsBundle had this config key removed. Nice catch. Do you like to contribute a pull request for this?

@shepard8 shepard8 mentioned this issue Jun 25, 2020
@shepard8
Copy link
Contributor Author

Sure, I left it just above. Thank you for inviting me to contribute!

@goetas
Copy link
Member

goetas commented Jun 25, 2020

This has been fixed in b960657

It will be merged to master soon

@goetas goetas closed this as completed Jun 25, 2020
@shepard8
Copy link
Contributor Author

This has been fixed in b960657

I don't agree, the commit you mention fixes the UPGRADE.md file. The problem this issue is about is in the main documentation, which probably deserves to be updated too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants