1
0
postdoc/db/migrate/20201130194055_create_emails.rb

22 lines
552 B
Ruby
Raw Normal View History

2020-12-06 20:49:03 +01:00
class CreateEmails < ActiveRecord::Migration[6.0]
def change
create_table :emails do |t|
t.references :mailbox, null: false, foreign_key: {
on_delete: :cascade,
on_update: :cascade
}
t.string :subject
t.string :template_id, null: false
t.string :rendered_html, null: false
t.string :rendered_plain_text, null: false
t.jsonb :request_payload, null: false
t.integer :personalization_id, null: false
t.jsonb :template_payload, null: false
t.timestamps
end
end
end