Discussion:
Always error "The database schema is not in sync with the current mapping file"
Neokortex Neokortex
2014-05-18 14:32:17 UTC
Permalink
I run command *php app/console doctrine:schema:validate* and have error:
*[Database] FAIL - The database schema is not in sync with the current
mapping file.*

Then i run command *php app/console doctrine:schema:update --force*
and again have this error:
*[Database] FAIL - The database schema is not in sync with the current
mapping file.*

What is problem?

Symfony 2.4.4
doctrine/annotations v1.1.2 Docblock
Annotations Parser
doctrine/cache v1.3.0 Caching library
offering an object-oriented API for many cache backends
doctrine/collections v1.2 Collections
Abstraction library
doctrine/common v2.4.1 Common Library for
Doctrine projects
doctrine/dbal 2.3.4 Database
Abstraction Layer
doctrine/doctrine-bundle v1.2.0 Symfony
DoctrineBundle
doctrine/inflector v1.0 Common String
Manipulations with regard to casing and singular/plural rules.
doctrine/lexer v1.0 Base library for a
lexer that can be used in Top-Down, Recursive Descent Parsers.
doctrine/orm 2.3.5
Object-Relational-Mapper for PHP
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Neokortex Neokortex
2014-05-23 11:42:12 UTC
Permalink
help, please
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Michał Pipa
2014-05-23 11:57:23 UTC
Permalink
Then i run command php app/console doctrine:schema:update --force
[Database] FAIL - The database schema is not in sync with the current
mapping file.
What is problem?
What is the output of "app/console doctrine:schema:update --dump-sql"?

--
Neokortex Neokortex
2014-05-26 06:51:49 UTC
Permalink
ALTER TABLE Category CHANGE description description VARCHAR(65535) DEFAULT
NULL;
ALTER TABLE Product CHANGE content content LONGTEXT DEFAULT NULL, CHANGE
description description VARCHAR(65535) DEFAULT NULL

What is the output of "app/console doctrine:schema:update --dump-sql"?
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Arne K. Haaje
2014-05-26 07:31:45 UTC
Permalink
Then you can run

php app/console doctrine:schema:update --force to perform the changes. Your
database schema should then be in sync.

Arne
Post by Neokortex Neokortex
ALTER TABLE Category CHANGE description description VARCHAR(65535) DEFAULT
NULL;
ALTER TABLE Product CHANGE content content LONGTEXT DEFAULT NULL, CHANGE
description description VARCHAR(65535) DEFAULT NULL
What is the output of "app/console doctrine:schema:update --dump-sql"?
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Michał Pipa
2014-05-27 00:02:50 UTC
Permalink
Post by Neokortex Neokortex
ALTER TABLE Category CHANGE description description VARCHAR(65535) DEFAULT
NULL;
ALTER TABLE Product CHANGE content content LONGTEXT DEFAULT NULL, CHANGE
description description VARCHAR(65535) DEFAULT NULL
What is your mapping for description in Category and Product? I think
you have type="string" and length=65535. If you change type to "text"
this issue will disappear.

I've noticed the same issue and I think there's a bug in DBAL Comparator class.

Are you using MySQL or other DBMS?

--
Neokortex Neokortex
2014-06-02 12:12:22 UTC
Permalink
Thank you! You're right.* I change type and my problem solved.* I using
MySQL
Post by Michał Pipa
What is your mapping for description in Category and Product? I think
you have type="string" and length=65535. If you change type to "text"
this issue will disappear.
I've noticed the same issue and I think there's a bug in DBAL Comparator class.
Are you using MySQL or other DBMS?
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Search results for 'Always error "The database schema is not in sync with the current mapping file"' (Questions and Answers)
7
replies
object oriented DBMS?
started 2007-07-09 03:05:39 UTC
programming & design
Loading...