B
B
BonBon Slick2018-05-05 20:38:05
symfony
BonBon Slick, 2018-05-05 20:38:05

Could not find any migrations to execute?

Logs

####################################################################################################
___ DOCTRINE _______________________________________________________________________________________
SELECT quote_ident(table_name) AS table_name,
                         table_schema AS schema_name
                  FROM   information_schema.tables
                  WHERE  table_schema NOT LIKE 'pg\_%'
                  AND    table_schema != 'information_schema'
                  AND    table_name != 'geometry_columns'
                  AND    table_name != 'spatial_ref_sys'
                  AND    table_type != 'VIEW'
___ DOCTRINE _______________________________________________________________________________________
CREATE TABLE migrations (version VARCHAR(255) NOT NULL, PRIMARY KEY(version))
___ DOCTRINE _______________________________________________________________________________________
SELECT version FROM migrations
___ DOCTRINE _______________________________________________________________________________________
SELECT version FROM migrations ORDER BY version DESC LIMIT 1
___ DOCTRINE _______________________________________________________________________________________
SELECT version FROM migrations
___ *** ERROR *** ==> CONSOLE ______________________________________________________________________
Error thrown while running command "doctrine:migrations:migrate". Message: "Could not find any
  migrations to execute."
--> exception: null
--> command: 'doctrine:migrations:migrate'
--> message: 'Could not find any migrations to execute.'
___ CONSOLE ________________________________________________________________________________________
Command "doctrine:migrations:migrate" exited with code "4"
--> command: 'doctrine:migrations:migrate'
--> code: 4

doctrine settigns
doctrine:
    dbal:
        driver:               "%app.database_driver%"
       ....
    orm:
        auto_generate_proxy_classes: '%kernel.debug%'
        naming_strategy: doctrine.orm.naming_strategy.underscore
        auto_mapping: true
        second_level_cache:
          enabled: true
        mappings:
            App:
                is_bundle: false
                type: xml
                dir: '%kernel.project_dir%/src/Infrastructure/Mappings'
                prefix: 'App\Domain\'
                alias: App

Mapping
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping
        xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
        https://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd">

    <entity name="App\Domain\User\Entity\User" table="users" >
        <indexes>
            <index name="user_search_index" columns="nickname,email,slug"/>
        </indexes>
        <embedded name="uuid" class="App\Domain\User\ValueObject\UserId" use-column-prefix="false"/>
        <embedded name="nickname" class="App\Domain\User\ValueObject\UserNickname" use-column-prefix="false"/>
        <embedded name="email" class="App\Domain\User\ValueObject\UserEmail" use-column-prefix="false"/>
        <embedded name="password" class="App\Domain\User\ValueObject\UserPassword" use-column-prefix="false"/>
        <field name="plainPassword" nullable="true"/>
    </entity>

    <embeddable name="UserPassword">
        <field name="password"
               type="text"
               unique="true"
               length="666"/>
    </embeddable>
    <embeddable name="UserEmail">
        <field name="email"
               unique="true"
               length="100"/>
    </embeddable>
    <embeddable name="UserNickname">
        <field name="nickname"
               unique="true"
               length="100"/>
    </embeddable>
    <embeddable name="UserId">
        <id name="uuid"
            type="guid"
            length="100"
            column="uuid">
            <generator strategy="NONE"/>
        </id>
    </embeddable>
</doctrine-mapping>

Entities are located at the address, everything works with annotations. App.Domain.User.Entity.User.dcm.xmllies at the address specified as dir

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
voronkovich, 2018-05-06
@BonBonSlick

You may need to use the 'orm.xml' extension instead of 'dcm.xml'.
See https://github.com/doctrine/DoctrineBundle/blob/1f...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question