Skip to content

Commit

Permalink
Corrected details that were wrongly committed in previous release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aquaj committed Sep 13, 2017
1 parent 21b0a11 commit 57bcc09
Show file tree
Hide file tree
Showing 43 changed files with 92 additions and 124 deletions.
1 change: 0 additions & 1 deletion app/models/animal.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/animal_group.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/bioproduct.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/building.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/building_division.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/easement.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/equipment.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/equipment_fleet.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/fungus.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
57 changes: 29 additions & 28 deletions app/models/intervention.rb
Expand Up @@ -22,33 +22,34 @@
#
# == Table: interventions
#
# accounted_at :datetime
# actions :string
# created_at :datetime not null
# creator_id :integer
# currency :string
# custom_fields :jsonb
# description :text
# event_id :integer
# id :integer not null, primary key
# issue_id :integer
# journal_entry_id :integer
# lock_version :integer default(0), not null
# nature :string not null
# number :string
# prescription_id :integer
# procedure_name :string not null
# request_compliant :boolean
# request_intervention_id :integer
# started_at :datetime not null
# state :string not null
# stopped_at :datetime not null
# trouble_description :text
# trouble_encountered :boolean default(FALSE), not null
# updated_at :datetime not null
# updater_id :integer
# whole_duration :integer not null
# working_duration :integer not null
# accounted_at :datetime
# actions :string
# auto_calculate_working_periods :boolean default(FALSE)
# created_at :datetime not null
# creator_id :integer
# currency :string
# custom_fields :jsonb
# description :text
# event_id :integer
# id :integer not null, primary key
# issue_id :integer
# journal_entry_id :integer
# lock_version :integer default(0), not null
# nature :string not null
# number :string
# prescription_id :integer
# procedure_name :string not null
# request_compliant :boolean
# request_intervention_id :integer
# started_at :datetime not null
# state :string not null
# stopped_at :datetime not null
# trouble_description :text
# trouble_encountered :boolean default(FALSE), not null
# updated_at :datetime not null
# updater_id :integer
# whole_duration :integer not null
# working_duration :integer not null
#

class Intervention < Ekylibre::Record::Base
Expand Down Expand Up @@ -90,9 +91,9 @@ class Intervention < Ekylibre::Record::Base
# [VALIDATORS[ Do not edit these lines directly. Use `rake clean:validations`.
validates :accounted_at, timeliness: { on_or_after: -> { Time.new(1, 1, 1).in_time_zone }, on_or_before: -> { Time.zone.now + 50.years } }, allow_blank: true
validates :actions, :number, length: { maximum: 500 }, allow_blank: true
validates :auto_calculate_working_periods, :request_compliant, inclusion: { in: [true, false] }, allow_blank: true
validates :description, :trouble_description, length: { maximum: 500_000 }, allow_blank: true
validates :nature, :procedure_name, :state, presence: true
validates :request_compliant, inclusion: { in: [true, false] }, allow_blank: true
validates :started_at, presence: true, timeliness: { on_or_after: -> { Time.new(1, 1, 1).in_time_zone }, on_or_before: -> { Time.zone.now + 50.years } }
validates :stopped_at, presence: true, timeliness: { on_or_after: ->(intervention) { intervention.started_at || Time.new(1, 1, 1).in_time_zone }, on_or_before: -> { Time.zone.now + 50.years } }
validates :trouble_encountered, inclusion: { in: [true, false] }
Expand Down
1 change: 0 additions & 1 deletion app/models/land_parcel.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/matter.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/plant.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/product.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/product_group.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/settlement.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/sub_zone.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/worker.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion app/models/zone.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
3 changes: 2 additions & 1 deletion config/locales/eng/models.yml
Expand Up @@ -472,6 +472,7 @@ eng:
authentication_token: "Authentication token"
author: "Author"
authorized_payments_count: "Authorized payments count"
# auto_calculate_working_periods: "Auto calculate working periods"
auto_updateable_addresses: "Auto updateable addresses"
average_value: "Average value"
balance: "Balance"
Expand Down Expand Up @@ -1288,7 +1289,7 @@ eng:
query: "Query"
rank_number: "Rank number"
read_at: "Read at"
reading_cache: "Reading cache"
reading_cache: "Reading cache" #?
reading_tasks: "Reading tasks" #?
readings: "Readings"
real_balance: "Real balance"
Expand Down
4 changes: 2 additions & 2 deletions db/structure.sql
Expand Up @@ -2,8 +2,8 @@
-- PostgreSQL database dump
--

-- Dumped from database version 9.6.3
-- Dumped by pg_dump version 9.6.3
-- Dumped from database version 9.6.4
-- Dumped by pg_dump version 9.6.4

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand Down
5 changes: 3 additions & 2 deletions db/tables.yml
Expand Up @@ -3567,6 +3567,9 @@ interventions:
type: datetime
actions:
type: string
auto_calculate_working_periods:
type: boolean
default: false
created_at:
type: datetime
required: true
Expand Down Expand Up @@ -6385,8 +6388,6 @@ products:
type: integer
picture_updated_at:
type: datetime
reading_cache:
type: jsonb
team_id:
type: integer
references: team
Expand Down
55 changes: 28 additions & 27 deletions test/fixtures/interventions.yml
Expand Up @@ -22,33 +22,34 @@
#
# == Table: interventions
#
# accounted_at :datetime
# actions :string
# created_at :datetime not null
# creator_id :integer
# currency :string
# custom_fields :jsonb
# description :text
# event_id :integer
# id :integer not null, primary key
# issue_id :integer
# journal_entry_id :integer
# lock_version :integer default(0), not null
# nature :string not null
# number :string
# prescription_id :integer
# procedure_name :string not null
# request_compliant :boolean
# request_intervention_id :integer
# started_at :datetime not null
# state :string not null
# stopped_at :datetime not null
# trouble_description :text
# trouble_encountered :boolean default(FALSE), not null
# updated_at :datetime not null
# updater_id :integer
# whole_duration :integer not null
# working_duration :integer not null
# accounted_at :datetime
# actions :string
# auto_calculate_working_periods :boolean default(FALSE)
# created_at :datetime not null
# creator_id :integer
# currency :string
# custom_fields :jsonb
# description :text
# event_id :integer
# id :integer not null, primary key
# issue_id :integer
# journal_entry_id :integer
# lock_version :integer default(0), not null
# nature :string not null
# number :string
# prescription_id :integer
# procedure_name :string not null
# request_compliant :boolean
# request_intervention_id :integer
# started_at :datetime not null
# state :string not null
# stopped_at :datetime not null
# trouble_description :text
# trouble_encountered :boolean default(FALSE), not null
# updated_at :datetime not null
# updater_id :integer
# whole_duration :integer not null
# working_duration :integer not null
#
---
interventions_001:
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/products.yml
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion test/models/animal_group_test.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion test/models/animal_test.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion test/models/bioproduct_test.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion test/models/building_division_test.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion test/models/building_test.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion test/models/easement_test.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion test/models/equipment_fleet_test.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down
1 change: 0 additions & 1 deletion test/models/equipment_test.rb
Expand Up @@ -73,7 +73,6 @@
# picture_file_name :string
# picture_file_size :integer
# picture_updated_at :datetime
# reading_cache :jsonb default("{}")
# team_id :integer
# tracking_id :integer
# type :string
Expand Down

0 comments on commit 57bcc09

Please sign in to comment.