Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3917

The database schema is not in sync with the current mapping file (but it is !)

$
0
0

I just fixed some things in my code. I'm now trying to validate my schema

php bin/console doctrine:schema:validate

Doctrine tells me my mapping is correct but my database schema is not. So I'm doing a

schema:update --dump-sql

which results in the same ALTER again and again, that I already performed many times.

Here is the ALTER :

 ALTER TABLE migration_versions CHANGE version version VARCHAR(14) NOT NULL;

I did it (with --force), the entity is reflecting the change already :

** * MigrationVersions * * @ORM\Table(name="migration_versions") * @ORM\Entity */class MigrationVersions{    /**     * @var string     *     * @ORM\Column(name="version", type="string", length=14, nullable=false)     * @ORM\Id     * @ORM\GeneratedValue(strategy="IDENTITY")     */    private $version;

I am correct right ? its varchar, lenght 14...

And so is it in my databaseenter image description here

I don't think Im making a mistake here but I may be missing something.


Viewing all articles
Browse latest Browse all 3917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>