feat: update party model with promoter and time tracking
- Add promoter_id reference to parties table - Add start_time and end_time datetime fields - Replace venue fields with single location string - Update database schema and migration files - Add port configuration to database.yml - Update architecture documentation This commit enhances the party model to support better event tracking and management, including promoter information and precise timing.
This commit is contained in:
@@ -16,6 +16,7 @@ default: &default
|
|||||||
username: <%= ENV.fetch("DB_USERNAME") { "root" } %>
|
username: <%= ENV.fetch("DB_USERNAME") { "root" } %>
|
||||||
password: <%= ENV.fetch("DB_PASSWORD") { "root" } %>
|
password: <%= ENV.fetch("DB_PASSWORD") { "root" } %>
|
||||||
host: <%= ENV.fetch("DB_HOST") { "127.0.0.1" } %>
|
host: <%= ENV.fetch("DB_HOST") { "127.0.0.1" } %>
|
||||||
|
port: <%= ENV.fetch("DB_port") { 3306 } %>
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
||||||
|
|||||||
@@ -6,10 +6,14 @@ class CreateParties < ActiveRecord::Migration[8.0]
|
|||||||
t.integer :state, default: 0, null: false
|
t.integer :state, default: 0, null: false
|
||||||
t.string :venue_name, null: false
|
t.string :venue_name, null: false
|
||||||
t.string :venue_address, null: false
|
t.string :venue_address, null: false
|
||||||
|
t.datetime start_time, :start_time
|
||||||
|
t.datetime end_datetime, :start_time
|
||||||
t.decimal :latitude, precision: 10, scale: 6, null: false
|
t.decimal :latitude, precision: 10, scale: 6, null: false
|
||||||
t.decimal :longitude, precision: 10, scale: 6, null: false
|
t.decimal :longitude, precision: 10, scale: 6, null: false
|
||||||
t.boolean :featured, default: false, null: false
|
t.boolean :featured, default: false, null: false
|
||||||
t.timestamps
|
t.timestamps
|
||||||
|
|
||||||
|
t.references :user, null: false, foreign_key: true
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index :parties, :state
|
add_index :parties, :state
|
||||||
@@ -17,3 +21,4 @@ class CreateParties < ActiveRecord::Migration[8.0]
|
|||||||
add_index :parties, [ :latitude, :longitude ]
|
add_index :parties, [ :latitude, :longitude ]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
14
db/schema.rb
generated
14
db/schema.rb
generated
@@ -10,20 +10,18 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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
|
ActiveRecord::Schema[8.0].define(version: 2025_08_24_211013) do
|
||||||
create_table "parties", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
|
create_table "parties", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
|
||||||
t.string "name", null: false
|
t.string "name", null: false
|
||||||
t.text "description", null: false
|
t.text "description", null: false
|
||||||
t.integer "state", default: 0, null: false
|
t.integer "state", default: 0, null: false
|
||||||
t.string "venue_name", null: false
|
|
||||||
t.string "venue_address", null: false
|
|
||||||
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.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.index ["featured"], name: "index_parties_on_featured"
|
t.integer "promoter_id"
|
||||||
t.index ["latitude", "longitude"], name: "index_parties_on_latitude_and_longitude"
|
t.datetime "start_time"
|
||||||
|
t.datetime "end_time"
|
||||||
|
t.string "location"
|
||||||
|
t.index ["promoter_id"], name: "index_parties_on_promoter_id"
|
||||||
t.index ["state"], name: "index_parties_on_state"
|
t.index ["state"], name: "index_parties_on_state"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -360,3 +360,4 @@ end
|
|||||||
- Secure payment processing with PCI compliance
|
- Secure payment processing with PCI compliance
|
||||||
- Implement rate limiting for API endpoints
|
- Implement rate limiting for API endpoints
|
||||||
- Regular security audits and dependency updates
|
- Regular security audits and dependency updates
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user