Is it possible to set a column type as INTERVAL in doctrine?
CREATE TABLE periodicity (periodicity INTERVAL);
But with doctrine yml format?
Is it possible to set a column type as INTERVAL in doctrine?
CREATE TABLE periodicity (periodicity INTERVAL);
But with doctrine yml format?
不是我知道的,但所有教义“日期时间”列类型都是在内部为您创建为 PHP \DateTime 对象。
https://doctrine-orm.readthedocs.io/en/latest/cookbook/working-with-datetime.html
不完全确定您的用例是什么,但如果您想要实体上的时间戳(带间隔),您可以在构造函数中简单地将一列标记为“new \Datetime('3 week')”。