chore(schema): create email_events
This commit is contained in:
parent
e488f52ca0
commit
07167cead9
3 changed files with 42 additions and 1 deletions
18
app/models/email_event.rb
Normal file
18
app/models/email_event.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: email_events
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# method :string not null
|
||||
# processed_at :datetime
|
||||
# status :string not null
|
||||
# subject :string not null
|
||||
# to :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class EmailEvent < ApplicationRecord
|
||||
enum status: {
|
||||
dispatched: 'dispatched'
|
||||
}
|
||||
end
|
13
db/migrate/20230109140138_create_email_events.rb
Normal file
13
db/migrate/20230109140138_create_email_events.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
class CreateEmailEvents < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :email_events do |t|
|
||||
t.string :to, null: false
|
||||
t.string :method, null: false
|
||||
t.string :status, null: false
|
||||
t.string :subject, null: false
|
||||
t.datetime :processed_at
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
12
db/schema.rb
12
db/schema.rb
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2022_12_27_084442) do
|
||||
ActiveRecord::Schema.define(version: 2023_01_09_140138) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
|
@ -407,6 +407,16 @@ ActiveRecord::Schema.define(version: 2022_12_27_084442) do
|
|||
t.index ["type_de_champ_id"], name: "index_drop_down_lists_on_type_de_champ_id"
|
||||
end
|
||||
|
||||
create_table "email_events", force: :cascade do |t|
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.string "method", null: false
|
||||
t.datetime "processed_at"
|
||||
t.string "status", null: false
|
||||
t.string "subject", null: false
|
||||
t.string "to", null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
end
|
||||
|
||||
create_table "etablissements", id: :serial, force: :cascade do |t|
|
||||
t.string "adresse"
|
||||
t.date "association_date_creation"
|
||||
|
|
Loading…
Add table
Reference in a new issue