Skip to content

Commit

Permalink
add table data migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
merefield committed Nov 28, 2023
1 parent 689c279 commit 617ee8a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions db/migrate/20231128010101_populate_locations_tables.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class PopulateLocationsTables < ActiveRecord::Migration[7.0]
def up
Rake::Task['locations:refresh_user_location_table'].invoke
Rake::Task['locations:refresh_topic_location_table'].invoke
end

def down
::Locations::UserLocation.delete_all
::Locations::TopicLocation.delete_all
end
end

0 comments on commit 617ee8a

Please sign in to comment.