Files
plottservice/db/migrate/20240727101347_create_jobs.rb
2024-10-02 13:51:15 +02:00

34 lines
1.1 KiB
Ruby

class CreateJobs < ActiveRecord::Migration[7.1]
def change
create_table :jobs do |t|
t.references :customer, null: true
t.references :creator, null: true
t.references :cashier, null: true
t.references :operator, null: true
t.string :customer_firstname
t.string :customer_lastname
t.string :operator_firstname
t.string :operator_lastname
t.string :cashier_firstname
t.string :cashier_lastname
t.datetime :printed_at
t.datetime :paid_at
t.datetime :status_changed_at
t.boolean :intern, default: false
t.string :cost_center
t.string :status, default: "open", 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.float :cost, default: 0
t.float :cost_qm, default: 0
t.boolean :privacy_policy, default: false
t.boolean :created_by_operator, default: false
t.timestamps
end
end
end