Redmine-Jobs/db/migrate/20231116202759_create_jobs.rb

16 lines
388 B
Ruby
Raw Normal View History

2023-11-16 20:23:09 +00:00
class CreateJobs < ActiveRecord::Migration[6.1]
def change
create_table :jobs do |t|
t.date :starts_on, null: false
t.date :ends_on, null: false
t.integer :external_project_id
t.string :name, null: false
t.references :project, foreign_key: true
t.string :description
2023-11-21 13:59:43 +00:00
t.timestamps
2023-11-16 20:23:09 +00:00
end
add_index :jobs, :name, unique: true
end
end