First of all, I'm sorry for my bad English.
Hi, I have the following problem:
I have a database in postgres that I need to map, to obtain their entities. All this seems to work well. The problem comes when I want to do my first 'migrations: diff', which for some reason in the migration file deletes all the sequences, which I should not do.
I need to be able to migrate without having to worry about having to erase from the file, the sequence, every time I'm going to make a change in some entity.
I detail my steps, up to the problem:
I use the following version of Symfony 4 :
Symfony 4.2.7
1º
php bin/console doctrine:mapping:convert --from-database annotation ./src/Entity
2º
php bin/console make:entity --regenerate
3º
php bin/console doctrine:migrations:generate
4º When executing this code :
php bin/console doctrine:migrations:diff
I get the following in the migration file :
$this->addSql('DROP SEQUENCE acceso_usuario_id_acceso_usuario_seq CASCADE');
$this->addSql('DROP SEQUENCE clientevisita_id_visita_seq CASCADE');
$this->addSql('DROP SEQUENCE llamada_weservice_id_llamada_seq CASCADE');
$this->addSql('DROP SEQUENCE id_tipo_producto_no_valido_seq CASCADE');
$this->addSql('DROP SEQUENCE cliente_visita_nula_seq CASCADE');
$this->addSql('DROP SEQUENCE textos_ayuda_id_seq CASCADE');
$this->addSql('DROP SEQUENCE forma_pago_id_forma_pago CASCADE');
$this->addSql('DROP SEQUENCE tasacion_id_tasacion_vencimiento_compra CASCADE');
$this->addSql('DROP SEQUENCE id_diagnostico_seq CASCADE');
$this->addSql('DROP SEQUENCE devolucion_id_seq CASCADE');
$this->addSql('DROP SEQUENCE pago_mixto_id_seq CASCADE');
$this->addSql('DROP SEQUENCE version_id_seq CASCADE');
$this->addSql('DROP SEQUENCE oro_tipo_cod_tipo_oro_seq CASCADE');
$this->addSql('DROP SEQUENCE motivo_no_diagnostico_id_seq CASCADE');
$this->addSql('DROP SEQUENCE no_diagnostico_id_seq CASCADE');
$this->addSql('DROP SEQUENCE avisos_vr_seq CASCADE');
$this->addSql('DROP SEQUENCE version_empleado_id_seq CASCADE');
$this->addSql('DROP SEQUENCE oro_cod_tipo_oro_seq CASCADE');
$this->addSql('DROP SEQUENCE tasacion_precios_id_tasacion_precios CASCADE');
$this->addSql('DROP SEQUENCE promocion_id_seq CASCADE');
$this->addSql('DROP SEQUENCE ve_webservice_id_ve_sql CASCADE');
$this->addSql('DROP SEQUENCE configuraciones_id_sec CASCADE');
$this->addSql('DROP SEQUENCE scoring_venta_recuperable_id_seq CASCADE');
$this->addSql('DROP SEQUENCE codigo_permiso_id_seq CASCADE');
$this->addSql('DROP SEQUENCE tasacion_tiempo_id_seq CASCADE');
$this->addSql('DROP SEQUENCE ws_permiso_compra_store_seq CASCADE');
$this->addSql('DROP SEQUENCE precio_venta_personalizado_id_seq CASCADE');
$this->addSql('DROP SEQUENCE solicitud_desbloqueo_id_seq CASCADE');
$this->addSql('DROP SEQUENCE estado_verif_rapida_seq CASCADE');
$this->addSql('DROP SEQUENCE usuario_puc_id_seq CASCADE');
$this->addSql('DROP SEQUENCE acceso_usuario_puc_id_seq CASCADE');
$this->addSql('DROP SEQUENCE tipo_notificacion_id_seq CASCADE');
$this->addSql('DROP SEQUENCE tipo_envio_notificacion_id_seq CASCADE');
$this->addSql('DROP SEQUENCE cesta_notificacion_id_seq CASCADE');
$this->addSql('DROP SEQUENCE motivo_cambio_scoring_seq CASCADE');
$this->addSql('DROP SEQUENCE cambio_scoring_id_seq CASCADE');
$this->addSql('DROP SEQUENCE envio_encuesta_seq CASCADE'); ```