Migration with SQLite failed #317
-
|
Based on the example model Article, the expanded model look like this: class Article < Marten::Model marten genmigrations generate: I noticed the constraints blank: true and default: nil are not noticed. marten migrate gives an error: "Unhandled exception: NOT NULL constraint failed: new_main_article.quelle (SQLite3::Exception)". |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hey! 👋 I am guessing that this is the field you added to your model? field :quelle, :string, max_size: 255, blank: true, default: nilThe class Article < Marten::Model
with_timestamp_fields
field :id, :big_int, primary_key: true, auto: true
field :title, :string, max_size: 255
field :content, : text
field :quelle, :string, max_size: 255, blank: true, null: true, default: nil
field :created_at, :date_time, auto_now_add: true, blank: true
field :updated_at, :date_time, auto_now: true, blank: true
endPlease remember that |
Beta Was this translation helpful? Give feedback.
Thanks for the quick reply!