Add a scope to Dossier to check if procedure is not hidden
This commit is contained in:
parent
760efcdad3
commit
be3304f71e
6 changed files with 48 additions and 2 deletions
6
db/migrate/20170627144046_add_hidden_at_to_dossiers.rb
Normal file
6
db/migrate/20170627144046_add_hidden_at_to_dossiers.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
class AddHiddenAtToDossiers < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :dossiers, :hidden_at, :datetime
|
||||
add_index :dossiers, :hidden_at
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170627143701) do
|
||||
ActiveRecord::Schema.define(version: 20170627144046) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -175,6 +175,8 @@ ActiveRecord::Schema.define(version: 20170627143701) do
|
|||
t.datetime "received_at"
|
||||
t.datetime "processed_at"
|
||||
t.text "motivation"
|
||||
t.datetime "hidden_at"
|
||||
t.index ["hidden_at"], name: "index_dossiers_on_hidden_at", using: :btree
|
||||
t.index ["procedure_id"], name: "index_dossiers_on_procedure_id", using: :btree
|
||||
t.index ["user_id"], name: "index_dossiers_on_user_id", using: :btree
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue