-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Based on the example model Article, the expanded model look like this:
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, default: nil
field :created_at, :date_time, auto_now_add: true, blank: true
field :updated_at, :date_time, auto_now: true, blank: true
end
marten genmigrations generate:
def plan
change_column :main_article, :quelle, :string, max_size: 255
end
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)".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels