We use GRDB for our iOS application and am adding the following migration:
migrator.registerMigration("v7") { db in
try db.alter(table: "DocAlertThirdPartyTrackingUrl") { t in
t.add(column: DocAlertThirdPartyTrackingUrl.CodingKeys.initialDate.rawValue, .date).defaults(to: ?????)
}
}
Not sure how to set this up so it uses the current date as the default?
If you want a default value that is always the current date you need to do it at a database level so use the sql variant of the defaults function