phase002 complete

This commit is contained in:
2026-09-15 20:28:07 -06:00
parent 9793cd08bc
commit a3a65c24ed
28 changed files with 656 additions and 13 deletions
@@ -0,0 +1,17 @@
class CreateMaintenanceSchedules < ActiveRecord::Migration[8.1]
def change
create_table :maintenance_schedules do |t|
t.references :vehicle, null: false, foreign_key: true
t.string :maintenance_type, null: false
t.integer :mileage_interval, null: false
t.integer :time_interval, null: false
t.timestamps
end
add_index :maintenance_schedules,
"vehicle_id, lower(maintenance_type)",
unique: true,
name: "index_maintenance_schedules_on_vehicle_and_lower_type"
end
end