Skip to content

Commit

Permalink
Merge pull request #1345 from SplitTime/oveson/rename-file-downloads-…
Browse files Browse the repository at this point in the history
…to-analytics-file-downloads

Migration to rename file_downloads table to analytics_file_downloads
  • Loading branch information
moveson authored Dec 19, 2024
2 parents 56df2c4 + f8186fb commit cdacc82
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RenameFileDownloadsToAnalyticsFileDownloads < ActiveRecord::Migration[7.0]
def change
rename_table :file_downloads, :analytics_file_downloads
end
end
30 changes: 15 additions & 15 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2024_12_19_004057) do
ActiveRecord::Schema[7.0].define(version: 2024_12_19_031810) do
# These are extensions that must be enabled in order to support this database
enable_extension "fuzzystrmatch"
enable_extension "pg_trgm"
Expand Down Expand Up @@ -54,6 +54,19 @@
t.index ["split_id"], name: "index_aid_stations_on_split_id"
end

create_table "analytics_file_downloads", force: :cascade do |t|
t.bigint "user_id", null: false
t.string "record_type", null: false
t.bigint "record_id", null: false
t.string "name", null: false
t.string "filename", null: false
t.string "byte_size", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["record_type", "record_id"], name: "index_file_downloads_on_record"
t.index ["user_id"], name: "index_analytics_file_downloads_on_user_id"
end

create_table "connections", force: :cascade do |t|
t.string "service_identifier", null: false
t.string "source_type", null: false
Expand Down Expand Up @@ -255,19 +268,6 @@
t.index ["user_id"], name: "index_export_jobs_on_user_id"
end

create_table "file_downloads", force: :cascade do |t|
t.bigint "user_id", null: false
t.string "record_type", null: false
t.bigint "record_id", null: false
t.string "name", null: false
t.string "filename", null: false
t.string "byte_size", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["record_type", "record_id"], name: "index_file_downloads_on_record"
t.index ["user_id"], name: "index_file_downloads_on_user_id"
end

create_table "friendly_id_slugs", force: :cascade do |t|
t.string "slug", null: false
t.integer "sluggable_id", null: false
Expand Down Expand Up @@ -767,6 +767,7 @@
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "aid_stations", "events"
add_foreign_key "aid_stations", "splits"
add_foreign_key "analytics_file_downloads", "users"
add_foreign_key "course_group_courses", "course_groups"
add_foreign_key "course_group_courses", "courses"
add_foreign_key "course_groups", "organizations"
Expand All @@ -782,7 +783,6 @@
add_foreign_key "events", "courses"
add_foreign_key "events", "event_groups"
add_foreign_key "export_jobs", "users"
add_foreign_key "file_downloads", "users"
add_foreign_key "historical_facts", "organizations"
add_foreign_key "historical_facts", "people"
add_foreign_key "import_jobs", "users"
Expand Down
Binary file modified erd.pdf
Binary file not shown.

0 comments on commit cdacc82

Please sign in to comment.