Mails: add refused, without_continuation, draft, closed, received mails object
This commit is contained in:
parent
7b336922cc
commit
695dc16b85
22 changed files with 295 additions and 73 deletions
11
db/migrate/20170306102116_create_received_mails.rb
Normal file
11
db/migrate/20170306102116_create_received_mails.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class CreateReceivedMails < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :received_mails do |t|
|
||||
t.text :body
|
||||
t.text :object
|
||||
t.references :procedure, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
11
db/migrate/20170306102238_create_closed_mails.rb
Normal file
11
db/migrate/20170306102238_create_closed_mails.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class CreateClosedMails < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :closed_mails do |t|
|
||||
t.text :body
|
||||
t.text :object
|
||||
t.belongs_to :procedure, index: true, unique: true, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
11
db/migrate/20170306102256_create_refused_mails.rb
Normal file
11
db/migrate/20170306102256_create_refused_mails.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class CreateRefusedMails < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :refused_mails do |t|
|
||||
t.text :body
|
||||
t.text :object
|
||||
t.belongs_to :procedure, index: true, unique: true, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,11 @@
|
|||
class CreateWithoutContinuationMails < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :without_continuation_mails do |t|
|
||||
t.text :body
|
||||
t.text :object
|
||||
t.belongs_to :procedure, index: true, unique: true, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
42
db/schema.rb
42
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: 20170302105557) do
|
||||
ActiveRecord::Schema.define(version: 20170306102320) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -104,6 +104,15 @@ ActiveRecord::Schema.define(version: 20170302105557) do
|
|||
t.index ["type_de_champ_id"], name: "index_champs_on_type_de_champ_id", using: :btree
|
||||
end
|
||||
|
||||
create_table "closed_mails", force: :cascade do |t|
|
||||
t.text "body"
|
||||
t.text "object"
|
||||
t.integer "procedure_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["procedure_id"], name: "index_closed_mails_on_procedure_id", using: :btree
|
||||
end
|
||||
|
||||
create_table "commentaires", force: :cascade do |t|
|
||||
t.string "email"
|
||||
t.datetime "created_at", null: false
|
||||
|
@ -343,6 +352,24 @@ ActiveRecord::Schema.define(version: 20170302105557) do
|
|||
t.integer "dossier_id"
|
||||
end
|
||||
|
||||
create_table "received_mails", force: :cascade do |t|
|
||||
t.text "body"
|
||||
t.text "object"
|
||||
t.integer "procedure_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["procedure_id"], name: "index_received_mails_on_procedure_id", using: :btree
|
||||
end
|
||||
|
||||
create_table "refused_mails", force: :cascade do |t|
|
||||
t.text "body"
|
||||
t.text "object"
|
||||
t.integer "procedure_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["procedure_id"], name: "index_refused_mails_on_procedure_id", using: :btree
|
||||
end
|
||||
|
||||
create_table "rna_informations", force: :cascade do |t|
|
||||
t.string "association_id"
|
||||
t.string "titre"
|
||||
|
@ -394,12 +421,25 @@ ActiveRecord::Schema.define(version: 20170302105557) do
|
|||
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
|
||||
end
|
||||
|
||||
create_table "without_continuation_mails", force: :cascade do |t|
|
||||
t.text "body"
|
||||
t.text "object"
|
||||
t.integer "procedure_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["procedure_id"], name: "index_without_continuation_mails_on_procedure_id", using: :btree
|
||||
end
|
||||
|
||||
add_foreign_key "cerfas", "dossiers"
|
||||
add_foreign_key "closed_mails", "procedures"
|
||||
add_foreign_key "commentaires", "dossiers"
|
||||
add_foreign_key "dossiers", "users"
|
||||
add_foreign_key "initiated_mails", "procedures"
|
||||
add_foreign_key "procedure_paths", "administrateurs"
|
||||
add_foreign_key "procedure_paths", "procedures"
|
||||
add_foreign_key "received_mails", "procedures"
|
||||
add_foreign_key "refused_mails", "procedures"
|
||||
add_foreign_key "without_continuation_mails", "procedures"
|
||||
|
||||
create_view :searches, sql_definition: <<-SQL
|
||||
SELECT dossiers.id AS dossier_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue