Skip to content

Commit

Permalink
Merge pull request #4383 from rubyforgood/fix-migration
Browse files Browse the repository at this point in the history
Fix migration
  • Loading branch information
cielf committed May 26, 2024
2 parents cf631da + 524af37 commit f36d786
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
1 change: 1 addition & 0 deletions db/migrate/20240512140954_clear_events_once_again.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class ClearEventsOnceAgain < ActiveRecord::Migration[7.0]
def change
safety_assured { execute('drop table inventory_discrepancies') }
Event.delete_all
Organization.all.each do |org|
SnapshotEvent.publish(org)
Expand Down
13 changes: 0 additions & 13 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -335,17 +335,6 @@
t.index ["feature_key", "key", "value"], name: "index_flipper_gates_on_feature_key_and_key_and_value", unique: true
end

create_table "inventory_discrepancies", force: :cascade do |t|
t.bigint "organization_id", null: false
t.bigint "event_id", null: false
t.json "diff"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["event_id"], name: "index_inventory_discrepancies_on_event_id"
t.index ["organization_id", "created_at"], name: "index_inventory_discrepancies_on_organization_id_and_created_at"
t.index ["organization_id"], name: "index_inventory_discrepancies_on_organization_id"
end

create_table "inventory_items", id: :serial, force: :cascade do |t|
t.integer "storage_location_id"
t.integer "item_id"
Expand Down Expand Up @@ -892,8 +881,6 @@
add_foreign_key "donations", "product_drives"
add_foreign_key "donations", "storage_locations"
add_foreign_key "families", "partners"
add_foreign_key "inventory_discrepancies", "events"
add_foreign_key "inventory_discrepancies", "organizations"
add_foreign_key "item_categories", "organizations"
add_foreign_key "item_categories_partner_groups", "item_categories"
add_foreign_key "item_categories_partner_groups", "partner_groups"
Expand Down

0 comments on commit f36d786

Please sign in to comment.