vapor / fluent-postgres-driver

🐘 PostgreSQL driver for Fluent.
MIT License
149 stars 53 forks source link

Support DELETE IF EXISTS, CASCADE for schema #95

Closed mura-admin closed 4 years ago

mura-admin commented 6 years ago

This is useful for fast iteration on Schema models where you want to quickly replace an existing Schema with an updated one and have scripted a complete wipe and recreate on each iteration.

CREATE IF NOT EXISTS would also be useful.

tanner0101 commented 4 years ago

Fluent 4 has support for create if not exists with the ignoreExisting() method. Tracking deletion if exists here: https://github.com/vapor/fluent-kit/issues/325