refactor(events): replace parties concept with events throughout the application
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> This commit refactors the entire application to replace the 'parties' concept with 'events'. All controllers, models, views, and related files have been updated to reflect this change. The parties table has been replaced with an events table, and all related functionality has been updated accordingly.
This commit is contained in:
0
db/cable_schema.rb
Normal file → Executable file
0
db/cable_schema.rb
Normal file → Executable file
0
db/cache_schema.rb
Normal file → Executable file
0
db/cache_schema.rb
Normal file → Executable file
0
db/migrate/20250816145933_devise_create_users.rb
Normal file → Executable file
0
db/migrate/20250816145933_devise_create_users.rb
Normal file → Executable file
10
db/migrate/20250823145902_create_parties.rb → db/migrate/20250823145902_create_events.rb
Normal file → Executable file
10
db/migrate/20250823145902_create_parties.rb → db/migrate/20250823145902_create_events.rb
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
class CreateParties < ActiveRecord::Migration[8.0]
|
||||
class CreateEvents < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :parties do |t|
|
||||
create_table :events do |t|
|
||||
t.string :name, null: false
|
||||
t.string :slug, null: false
|
||||
t.string :image, null: true
|
||||
@@ -18,8 +18,8 @@ class CreateParties < ActiveRecord::Migration[8.0]
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :parties, :state
|
||||
add_index :parties, :featured
|
||||
add_index :parties, [ :latitude, :longitude ]
|
||||
add_index :events, :state
|
||||
add_index :events, :featured
|
||||
add_index :events, [ :latitude, :longitude ]
|
||||
end
|
||||
end
|
||||
4
db/migrate/20250823170408_create_ticket_types.rb
Normal file → Executable file
4
db/migrate/20250823170408_create_ticket_types.rb
Normal file → Executable file
@@ -9,12 +9,12 @@ class CreateTicketTypes < ActiveRecord::Migration[8.0]
|
||||
t.datetime :sale_end_at
|
||||
t.boolean :requires_id
|
||||
t.integer :minimum_age
|
||||
t.references :party, null: false, foreign_key: false
|
||||
t.references :event, null: false, foreign_key: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :ticket_types, :party_id unless index_exists?(:ticket_types, :party_id)
|
||||
add_index :ticket_types, :event_id unless index_exists?(:ticket_types, :event_id)
|
||||
add_index :ticket_types, :sale_start_at unless index_exists?(:ticket_types, :sale_start_at)
|
||||
add_index :ticket_types, :sale_end_at unless index_exists?(:ticket_types, :sale_end_at)
|
||||
end
|
||||
|
||||
0
db/migrate/20250823171354_create_tickets.rb
Normal file → Executable file
0
db/migrate/20250823171354_create_tickets.rb
Normal file → Executable file
0
db/queue_schema.rb
Normal file → Executable file
0
db/queue_schema.rb
Normal file → Executable file
14
db/schema.rb
generated
Normal file → Executable file
14
db/schema.rb
generated
Normal file → Executable file
@@ -11,7 +11,7 @@
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
||||
create_table "parties", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
|
||||
create_table "events", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "slug", null: false
|
||||
t.string "image"
|
||||
@@ -27,10 +27,10 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
||||
t.bigint "user_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["featured"], name: "index_parties_on_featured"
|
||||
t.index ["latitude", "longitude"], name: "index_parties_on_latitude_and_longitude"
|
||||
t.index ["state"], name: "index_parties_on_state"
|
||||
t.index ["user_id"], name: "index_parties_on_user_id"
|
||||
t.index ["featured"], name: "index_events_on_featured"
|
||||
t.index ["latitude", "longitude"], name: "index_events_on_latitude_and_longitude"
|
||||
t.index ["state"], name: "index_events_on_state"
|
||||
t.index ["user_id"], name: "index_events_on_user_id"
|
||||
end
|
||||
|
||||
create_table "ticket_types", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
|
||||
@@ -42,10 +42,10 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
||||
t.datetime "sale_end_at"
|
||||
t.boolean "requires_id"
|
||||
t.integer "minimum_age"
|
||||
t.bigint "party_id", null: false
|
||||
t.bigint "event_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["party_id"], name: "index_ticket_types_on_party_id"
|
||||
t.index ["event_id"], name: "index_ticket_types_on_event_id"
|
||||
t.index ["sale_end_at"], name: "index_ticket_types_on_sale_end_at"
|
||||
t.index ["sale_start_at"], name: "index_ticket_types_on_sale_start_at"
|
||||
end
|
||||
|
||||
0
db/seeds.rb
Normal file → Executable file
0
db/seeds.rb
Normal file → Executable file
Reference in New Issue
Block a user