Files
plottservice/db/migrate/20240727101347_create_jobs.rb
David Böhm c5e55eb410 Added job attributes, fixed seeds.rb
Added some attributes like status_changed_at. Refactored migration
files.
Changes to the migration file makes it necessary to reimport the
database: db:drop, db:create, db:migrate, db:seed
2024-08-02 13:47:44 +02:00

29 lines
927 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 :status_changed_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.boolean :privacy_policy_accepted, default: false
t.timestamps
end
end
end