执行 heroku db:push 给出 ArgumentError: invalid date (Sequel::InvalidValue) 这是标准的吗?
执行 heroku db:push
一切似乎都很顺利
发送模式 架构:100% |==============================================|时间:00:00:05 发送索引 schema_migrat:100% |==========================================|时间:00:00:00 用户:100% |================================================ =============|时间:00:00:01 历史: 100% |================================================ ===========|时间:00:00:00 发送数据 4张表,587条记录
schema_migrat:100% |============================================ ======|时间:00:00:00
当我得到
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/date.rb:1573:in new_by_frags': ArgumentError: 无效日期(续集::无效值) 来自 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/date.rb:1618:in
parse' 来自 /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:222:in string_to_datetime' 来自 /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/timezones.rb:92:in
convert_input_timestamp' 来自 /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/timezones.rb:163:in convert_timestamp' 来自 /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/timezones.rb:46:in
database_to_application_timestamp'
编辑:添加架构/迁移
t.string "apothiki" t.string "timh" t.datetime "created_at" t.datetime "updated_at" t.string "photo_file_name" t.string "photo_content_type" t.integer "photo_file_size" t.datetime "photo_updated_at"
Performing a heroku db:push
everything seem to be going ok
Sending schema
Schema: 100% |==========================================| Time: 00:00:05
Sending indexes
schema_migrat: 100% |=====================================| Time: 00:00:00
users: 100% |==========================================================| Time: 00:00:01
histories: 100% |========================================================| Time: 00:00:00
Sending data
4 tables, 587 records
schema_migrat: 100% |==============================================| Time: 00:00:00
when i get
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/date.rb:1573:in new_by_frags': ArgumentError: invalid date (Sequel::InvalidValue)
parse'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/date.rb:1618:in
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/core.rb:222:in string_to_datetime'
convert_input_timestamp'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/timezones.rb:92:in
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/timezones.rb:163:in convert_timestamp'
database_to_application_timestamp'
from /Library/Ruby/Gems/1.8/gems/sequel-3.17.0/lib/sequel/timezones.rb:46:in
EDIT: Adding Schema/Migration
t.string "apothiki"
t.string "timh"
t.datetime "created_at"
t.datetime "updated_at"
t.string "photo_file_name"
t.string "photo_content_type"
t.integer "photo_file_size"
t.datetime "photo_updated_at"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,我正在从 CSV 文件导入数据,但创建和修改的所有日期时间都是空的,这对于本地部署 sqlite 来说不是问题。一旦我为所有记录填写了正确的日期,它肯定会推动数据库正常运行。这样就解决了!感谢您的帮助!
Ok, i was importing my data from an CSV file but all my datetimes from created and modified were empty, and that wasnt a problem with sqlite deploying locally. once i filled proper dates to all the records it sure pushed the db okay. so solved! thanks for the help!