Supression des contraintes de nullité
This commit is contained in:
parent
1df14cbefd
commit
faff8a5222
|
@ -11,13 +11,6 @@ class Email < ApplicationRecord
|
|||
serialize :servers, Array
|
||||
serialize :issues, Array
|
||||
|
||||
validates :message_id, presence: true
|
||||
validates :subject, presence: true
|
||||
validates :date, presence: true
|
||||
validates :delivered_to, presence: true
|
||||
validates :from, presence: true
|
||||
validates :headers, presence: true
|
||||
|
||||
paginates_per 10
|
||||
|
||||
def postponed?
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
class CreateEmails < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :emails do |t|
|
||||
t.string :message_id, null: false
|
||||
t.string :subject, null: false
|
||||
t.datetime :date, null: false
|
||||
t.string :to, null: false
|
||||
t.string :delivered_to, null: false
|
||||
t.string :from, null: false
|
||||
t.string :message_id
|
||||
t.string :subject
|
||||
t.datetime :date
|
||||
t.string :to
|
||||
t.string :delivered_to
|
||||
t.string :from
|
||||
t.text :headers
|
||||
t.text :plain_body
|
||||
t.boolean :cron, default: false, null: false
|
||||
|
|
12
db/schema.rb
12
db/schema.rb
|
@ -61,12 +61,12 @@ ActiveRecord::Schema.define(version: 2021_01_29_124143) do
|
|||
end
|
||||
|
||||
create_table "emails", force: :cascade do |t|
|
||||
t.string "message_id", null: false
|
||||
t.string "subject", null: false
|
||||
t.datetime "date", null: false
|
||||
t.string "to", null: false
|
||||
t.string "delivered_to", null: false
|
||||
t.string "from", null: false
|
||||
t.string "message_id"
|
||||
t.string "subject"
|
||||
t.datetime "date"
|
||||
t.string "to"
|
||||
t.string "delivered_to"
|
||||
t.string "from"
|
||||
t.text "headers"
|
||||
t.text "plain_body"
|
||||
t.boolean "cron", default: false, null: false
|
||||
|
|
Loading…
Reference in a new issue