vapor / fluent-mysql-driver

🖋🐬 Swift ORM (queries, models, relations, etc) built on MySQL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to remove constraints in update

siemensikkema opened this issue · comments

On version 3.0.2 when doing

return Database.update(Product.self, on: conn) { updater in
  updater.deleteConstraint(.constraint(.notNull, .keyPath(\Product.someProperty)))
}

No statement to delete the constraint is created: ALTER TABLE `Product` []

The deleteConstraints value from FluentMySQLSchema is not copied to MySQLAlterTable here as there is no such property on that struct.

This issue is similar to #147