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.
26 lines
816 B
Ruby
Executable File
26 lines
816 B
Ruby
Executable File
class CreateEvents < ActiveRecord::Migration[8.0]
|
|
def change
|
|
create_table :events do |t|
|
|
t.string :name, null: false
|
|
t.string :slug, null: false
|
|
t.string :image, null: true
|
|
t.text :description, null: false
|
|
t.integer :state, default: 0, null: false
|
|
t.string :venue_name, null: false
|
|
t.string :venue_address, null: false
|
|
t.datetime :start_time
|
|
t.datetime :end_time
|
|
t.decimal :latitude, precision: 10, scale: 6, null: false
|
|
t.decimal :longitude, precision: 10, scale: 6, null: false
|
|
t.boolean :featured, default: false, null: false
|
|
t.references :user, null: false, foreign_key: false
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :events, :state
|
|
add_index :events, :featured
|
|
add_index :events, [ :latitude, :longitude ]
|
|
end
|
|
end
|