Skip to content

Commit

Permalink
update start date and end date on the assignments/requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiomagalhaes committed Mar 21, 2024
1 parent aa8e766 commit 5b51525
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app/models/assignment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#
# id :bigint not null, primary key
# coverage :float
# end_date :date
# start_date :date
# end_date :datetime
# start_date :datetime
# created_at :datetime not null
# updated_at :datetime not null
# requirement_id :bigint not null
Expand Down
4 changes: 2 additions & 2 deletions app/models/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#
# id :bigint not null, primary key
# coverage :float
# end_date :date
# start_date :date
# end_date :datetime
# start_date :datetime
# created_at :datetime not null
# updated_at :datetime not null
# profession_id :bigint not null
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

class ChangeDateToDateTimeInRequirements < ActiveRecord::Migration[7.0]
def up
change_column :requirements, :end_date, :datetime
change_column :requirements, :start_date, :datetime
end

def down
change_column :requirements, :end_date, :date
change_column :requirements, :start_date, :date
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

class ChangeDateToDateTimeInAssignments < ActiveRecord::Migration[7.0]
def up
change_column :assignments, :end_date, :datetime
change_column :assignments, :start_date, :datetime
end

def down
change_column :assignments, :end_date, :date
change_column :assignments, :start_date, :date
end
end
10 changes: 5 additions & 5 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec/factories/assignments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#
# id :bigint not null, primary key
# coverage :float
# end_date :date
# start_date :date
# end_date :datetime
# start_date :datetime
# created_at :datetime not null
# updated_at :datetime not null
# requirement_id :bigint not null
Expand Down
4 changes: 2 additions & 2 deletions spec/factories/requirements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#
# id :bigint not null, primary key
# coverage :float
# end_date :date
# start_date :date
# end_date :datetime
# start_date :datetime
# created_at :datetime not null
# updated_at :datetime not null
# profession_id :bigint not null
Expand Down
4 changes: 2 additions & 2 deletions spec/models/assignment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#
# id :bigint not null, primary key
# coverage :float
# end_date :date
# start_date :date
# end_date :datetime
# start_date :datetime
# created_at :datetime not null
# updated_at :datetime not null
# requirement_id :bigint not null
Expand Down
4 changes: 2 additions & 2 deletions spec/models/requirement_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#
# id :bigint not null, primary key
# coverage :float
# end_date :date
# start_date :date
# end_date :datetime
# start_date :datetime
# created_at :datetime not null
# updated_at :datetime not null
# profession_id :bigint not null
Expand Down

0 comments on commit 5b51525

Please sign in to comment.