diff --git a/db/migrate/20241219031810_rename_file_downloads_to_analytics_file_downloads.rb b/db/migrate/20241219031810_rename_file_downloads_to_analytics_file_downloads.rb new file mode 100644 index 000000000..dcc258bf3 --- /dev/null +++ b/db/migrate/20241219031810_rename_file_downloads_to_analytics_file_downloads.rb @@ -0,0 +1,5 @@ +class RenameFileDownloadsToAnalyticsFileDownloads < ActiveRecord::Migration[7.0] + def change + rename_table :file_downloads, :analytics_file_downloads + end +end diff --git a/db/schema.rb b/db/schema.rb index 89844e8e0..b661a04c7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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" @@ -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 @@ -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 @@ -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" @@ -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" diff --git a/erd.pdf b/erd.pdf index 4befaeca8..dd9902e74 100644 Binary files a/erd.pdf and b/erd.pdf differ