-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Problem with doctrine diff #598
Comments
@GuigZ- we'll need some more info about what you expected vs what happened. But, in general, problems with the database diffing are bugs in |
This should be reported to doctrine/dbal, as it is the project implementing the schema diffing (the migrations project rely on the schema diffing tools of DBAL). Btw, when reporting it to DBAL, please provide more information about your schema and about the platform you are using. |
I use Symfony 4, with php 7 and MariaDB from latest version. My mapping is App\Entity\Address:
type: entity
repositoryClass: App\Repository\AddressRepository
indexes:
uuid_index:
columns: [ uuid ]
id:
id:
type: integer
generator: {strategy: AUTO}
fields:
uuid:
type: uuid
unique: true
name:
type: string
length: 100
address:
type: string
length: 255
complement:
type: string
nullable: true
length: 255
postcode:
type: string
length: 100
city:
type: string
length: 100
deleted:
type: boolean
createdAt:
type: datetime
gedmo:
timestampable:
on: create
updatedAt:
type: datetime
gedmo:
timestampable:
on: update I go on dbal to open an issue :) |
looks related to doctrine/orm#6845 |
@GuigZ- did you checked your current database/tables state? Because doctrine will try to do a diff comparing the entity metadata and the current state of the database. |
Hi, when i use very verbose on my command, doctrine create this request : CREATE TABLE address (
id INT AUTO_INCREMENT NOT NULL,
uuid CHAR(36) NOT NULL COMMENT '(DC2Type:uuid)',
name VARCHAR(100) NOT NULL,
address VARCHAR(255) NOT NULL,
complement VARCHAR(255) DEFAULT NULL,
postcode VARCHAR(100) NOT NULL,
city VARCHAR(100) NOT NULL,
deleted TINYINT(1) NOT NULL,
created_at DATETIME NOT NULL,
updated_at DATETIME NOT NULL,
UNIQUE INDEX UNIQ_D4E6F81D17F50A6 (uuid),
INDEX uuid_index (uuid),
PRIMARY KEY(id)
) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB When i use PMA to export my table : DROP TABLE IF EXISTS `address`;
CREATE TABLE IF NOT EXISTS `address` (
`id` int(11) NOT NULL,
`uuid` char(36) COLLATE utf8_unicode_ci NOT NULL COMMENT '(DC2Type:uuid)',
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`complement` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`postcode` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`city` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`deleted` tinyint(1) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; So the problem is not on my server i think... |
I open the new issue here : doctrine/dbal#3006 |
Hi,
When i use the doctrine diff, doctrine create a file with this line :
The text was updated successfully, but these errors were encountered: