Skip to content

Commit

Permalink
Merge branch 'md/usage-report' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
tvcam committed Aug 23, 2023
2 parents d933f40 + b58ef45 commit 981fb09
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/models/organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Organization < ActiveRecord::Base
SUPPORTED_LANGUAGES = %w(en km my).freeze
TYPES = ['Faith Based Organization', 'Government Organization', "Disabled People's Organization", 'Non Government Organization', 'Community Based Organization', 'Other Organization'].freeze

acts_as_paranoid
has_paper_trail on: :update, only: :integrated
mount_uploader :logo, ImageUploader

Expand Down
6 changes: 6 additions & 0 deletions db/migrate/20230823121242_add_deleted_at_to_organizations.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class AddDeletedAtToOrganizations < ActiveRecord::Migration
def change
add_column :organizations, :deleted_at, :datetime
add_index :organizations, :deleted_at
end
end
4 changes: 3 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20230823093643) do
ActiveRecord::Schema.define(version: 20230823121242) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -1903,8 +1903,10 @@
t.string "ngo_type"
t.integer "referred_count", default: 0
t.integer "exited_client", default: 0
t.datetime "deleted_at"
end

add_index "organizations", ["deleted_at"], name: "index_organizations_on_deleted_at", using: :btree
add_index "organizations", ["full_name"], name: "index_organizations_on_full_name", using: :btree
add_index "organizations", ["short_name"], name: "index_organizations_on_short_name", using: :btree

Expand Down

0 comments on commit 981fb09

Please sign in to comment.