I have a PostgreSQL database I would like to use with Doctrine. The database has DEFAULT values on some of the fields (for example like default nextval('transfer_seq'::regclass)
).
When I try to do a orm:schema-tool:update
to alter the database, everything works otherwise ok, but Doctrine insists on dropping all of the pre-existing defaults, with ALTER TABLE ext_requests DROP DEFAULT
.
Of course, it's somewhat trivial to manually run the changes to database just ignoreing the lines with DROP DEFAULT, but I'm looking to automating the process, so it seems silly not to be able to just use the update command directly.
Is there a way to tell Doctrine schema-tool to ignore any alterations to PostgreSQL default values?
(I know I could use Doctrine @PrePersist to set defaults, but since Doctrine isn't the only client using the database this isn't really a solution.)