Add & Display Flights
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
class CreateAircrafts < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :aircrafts do |t|
|
||||
t.string :reg
|
||||
t.string :serial
|
||||
t.float :tach
|
||||
t.float :hobbs
|
||||
t.date :purchase_date
|
||||
t.float :purchase_tach
|
||||
t.float :purchase_hobbs
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
class CreateEngines < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :engines do |t|
|
||||
t.references :aircraft, foreign_key: true
|
||||
t.date :oil_date
|
||||
t.float :oil_tach
|
||||
t.date :major_date
|
||||
t.float :major_tach
|
||||
t.date :top_date
|
||||
t.float :top_tach
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
class CreateInspections < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :inspections do |t|
|
||||
t.references :aircraft, foreign_key: true
|
||||
t.date :annual_date
|
||||
t.float :annual_tach
|
||||
t.float :annual_hobbs
|
||||
t.date :pitot_static
|
||||
t.date :vor
|
||||
t.date :elt
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
class CreateFlights < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :flights do |t|
|
||||
t.references :aircraft, foreign_key: true
|
||||
t.date :date
|
||||
t.string :from
|
||||
t.string :to
|
||||
t.float :tach
|
||||
t.float :hobbs
|
||||
t.boolean :oil
|
||||
t.boolean :fuel
|
||||
t.float :time
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user