Changes to the migration file make it necessary to reimport the database: db:drop, db:create, db:migrate, db:seed
28 lines
854 B
Ruby
28 lines
854 B
Ruby
class CreateJobs < ActiveRecord::Migration[7.1]
|
|
def change
|
|
create_table :jobs do |t|
|
|
t.references :operator, null: true
|
|
t.references :costumer, null: true
|
|
t.string :operator_firstname
|
|
t.string :operator_lastname
|
|
t.string :costumer_firstname
|
|
t.string :costumer_lastname
|
|
t.boolean :printed, default: false
|
|
t.boolean :paid, default: false
|
|
t.datetime :printed_at
|
|
t.datetime :paid_at
|
|
t.boolean :intern, default: false
|
|
t.string :cost_center
|
|
t.integer :status, default: 0, index: true
|
|
t.integer :number_of_plans_a0, default: 0
|
|
t.integer :number_of_plans_a1, default: 0
|
|
t.integer :number_of_plans_a2, default: 0
|
|
t.integer :number_of_plans_a3, default: 0
|
|
t.float :costum_qm_plan, default: 0
|
|
t.string :pdf
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|