diff --git a/Gemfile b/Gemfile index ffab62fcb5..cb46bb3235 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source 'https://rubygems.org' group :default do gem 'bootsnap' - gem 'rails', '~> 6.1.7' + gem 'rails', '~> 7.0.8' # Fix incompatibility with between Ruby 3.1 and Psych 4 (used for yaml) # see https://stackoverflow.com/a/71192990 diff --git a/Gemfile.lock b/Gemfile.lock index 22e74f341d..60c8c361b3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -34,70 +34,76 @@ GEM specs: aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (6.1.7.10) - actionpack (= 6.1.7.10) - activesupport (= 6.1.7.10) + actioncable (7.0.8.1) + actionpack (= 7.0.8.1) + activesupport (= 7.0.8.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.10) - actionpack (= 6.1.7.10) - activejob (= 6.1.7.10) - activerecord (= 6.1.7.10) - activestorage (= 6.1.7.10) - activesupport (= 6.1.7.10) + actionmailbox (7.0.8.1) + actionpack (= 7.0.8.1) + activejob (= 7.0.8.1) + activerecord (= 7.0.8.1) + activestorage (= 7.0.8.1) + activesupport (= 7.0.8.1) mail (>= 2.7.1) - actionmailer (6.1.7.10) - actionpack (= 6.1.7.10) - actionview (= 6.1.7.10) - activejob (= 6.1.7.10) - activesupport (= 6.1.7.10) + net-imap + net-pop + net-smtp + actionmailer (7.0.8.1) + actionpack (= 7.0.8.1) + actionview (= 7.0.8.1) + activejob (= 7.0.8.1) + activesupport (= 7.0.8.1) mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp rails-dom-testing (~> 2.0) - actionpack (6.1.7.10) - actionview (= 6.1.7.10) - activesupport (= 6.1.7.10) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.8.1) + actionview (= 7.0.8.1) + activesupport (= 7.0.8.1) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) actionpack-xml_parser (2.0.1) actionpack (>= 5.0) railties (>= 5.0) - actiontext (6.1.7.10) - actionpack (= 6.1.7.10) - activerecord (= 6.1.7.10) - activestorage (= 6.1.7.10) - activesupport (= 6.1.7.10) + actiontext (7.0.8.1) + actionpack (= 7.0.8.1) + activerecord (= 7.0.8.1) + activestorage (= 7.0.8.1) + activesupport (= 7.0.8.1) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.7.10) - activesupport (= 6.1.7.10) + actionview (7.0.8.1) + activesupport (= 7.0.8.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.7.10) - activesupport (= 6.1.7.10) + activejob (7.0.8.1) + activesupport (= 7.0.8.1) globalid (>= 0.3.6) - activemodel (6.1.7.10) - activesupport (= 6.1.7.10) - activerecord (6.1.7.10) - activemodel (= 6.1.7.10) - activesupport (= 6.1.7.10) + activemodel (7.0.8.1) + activesupport (= 7.0.8.1) + activerecord (7.0.8.1) + activemodel (= 7.0.8.1) + activesupport (= 7.0.8.1) activerecord-import (1.7.0) activerecord (>= 4.2) - activestorage (6.1.7.10) - actionpack (= 6.1.7.10) - activejob (= 6.1.7.10) - activerecord (= 6.1.7.10) - activesupport (= 6.1.7.10) + activestorage (7.0.8.1) + actionpack (= 7.0.8.1) + activejob (= 7.0.8.1) + activerecord (= 7.0.8.1) + activesupport (= 7.0.8.1) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7.10) + activesupport (7.0.8.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) after_commit_everywhere (1.4.0) @@ -279,7 +285,7 @@ GEM mustermann (3.0.0) ruby2_keywords (~> 0.0.1) mysql2 (0.5.6) - net-imap (0.5.0) + net-imap (0.5.1) date net-protocol net-ldap (0.19.0) @@ -330,21 +336,20 @@ GEM rack rack-test (2.1.0) rack (>= 1.3) - rails (6.1.7.10) - actioncable (= 6.1.7.10) - actionmailbox (= 6.1.7.10) - actionmailer (= 6.1.7.10) - actionpack (= 6.1.7.10) - actiontext (= 6.1.7.10) - actionview (= 6.1.7.10) - activejob (= 6.1.7.10) - activemodel (= 6.1.7.10) - activerecord (= 6.1.7.10) - activestorage (= 6.1.7.10) - activesupport (= 6.1.7.10) + rails (7.0.8.1) + actioncable (= 7.0.8.1) + actionmailbox (= 7.0.8.1) + actionmailer (= 7.0.8.1) + actionpack (= 7.0.8.1) + actiontext (= 7.0.8.1) + actionview (= 7.0.8.1) + activejob (= 7.0.8.1) + activemodel (= 7.0.8.1) + activerecord (= 7.0.8.1) + activestorage (= 7.0.8.1) + activesupport (= 7.0.8.1) bundler (>= 1.15.0) - railties (= 6.1.7.10) - sprockets-rails (>= 2.0.0) + railties (= 7.0.8.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -362,12 +367,13 @@ GEM loofah (~> 2.21) nokogiri (~> 1.14) rails-perftest (0.0.7) - railties (6.1.7.10) - actionpack (= 6.1.7.10) - activesupport (= 6.1.7.10) + railties (7.0.8.1) + actionpack (= 7.0.8.1) + activesupport (= 7.0.8.1) method_source rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.2.1) rb-fsevent (0.11.2) @@ -491,13 +497,6 @@ GEM sorted_set (1.0.3) rbtree set (~> 1.0) - sprockets (4.2.1) - concurrent-ruby (~> 1.0) - rack (>= 2.2.4, < 4) - sprockets-rails (3.5.2) - actionpack (>= 6.1) - activesupport (>= 6.1) - sprockets (>= 3.0.0) ssrf_filter (1.1.2) syntax_tree (6.2.0) prettier_print (>= 1.2.0) @@ -516,7 +515,7 @@ GEM thor (1.3.2) tilt (2.4.0) timecop (0.9.10) - timeout (0.4.1) + timeout (0.4.2) traceroute (0.8.1) rails (>= 3.0.0) tzinfo (2.0.6) @@ -610,7 +609,7 @@ DEPENDENCIES rack-acceptable rack-cors rack-mini-profiler - rails (~> 6.1.7) + rails (~> 7.0.8) rails-controller-testing rails-erd rails-perftest diff --git a/app/api/core/io/json/stream.rb b/app/api/core/io/json/stream.rb index 523117eec6..74dd94dc74 100644 --- a/app/api/core/io/json/stream.rb +++ b/app/api/core/io/json/stream.rb @@ -63,7 +63,7 @@ def encode(object, options = {}) # rubocop:todo Metrics/CyclomaticComplexity when ActiveSupport::TimeWithZone string_encode(object.to_s) when Time - string_encode(object.to_s(:compatible)) + string_encode(object.to_fs(:compatible)) when Hash hash_encode(object, options) when ZIPPABLE diff --git a/app/models/accession_service.rb b/app/models/accession_service.rb index 9500b52391..ac24914f56 100644 --- a/app/models/accession_service.rb +++ b/app/models/accession_service.rb @@ -122,9 +122,9 @@ def submit(user, *accessionables) # rubocop:todo Metrics/CyclomaticComplexity ensure files.each(&:close) # not really necessary but recommended end - - return accessionables.map(&:accession_number) # rubocop:todo Rails/TransactionExitStatement end + + accessionables.map(&:accession_number) end # rubocop:enable Metrics/PerceivedComplexity, Metrics/MethodLength, Metrics/BlockLength, Metrics/AbcSize diff --git a/app/models/bait_library_type.rb b/app/models/bait_library_type.rb index 6d642c24b0..8139b95587 100644 --- a/app/models/bait_library_type.rb +++ b/app/models/bait_library_type.rb @@ -7,7 +7,7 @@ class BaitLibraryType < ApplicationRecord # category is used for billing, to differentiate between products with Custom and Standard bait libraries # Automated billing report stuff has been removed, but this is still useful downstream so we'll keep it - enum category: { standard: 0, custom: 1 } + enum :category, { standard: 0, custom: 1 } has_many :bait_libraries diff --git a/app/models/barcode.rb b/app/models/barcode.rb index 9ce9eb8392..0811cb0113 100644 --- a/app/models/barcode.rb +++ b/app/models/barcode.rb @@ -26,7 +26,8 @@ class Barcode < ApplicationRecord after_commit :broadcast_barcode # Caution! Do not adjust the index of existing formats. - enum format: { + enum :format, + { sanger_ean13: 0, infinium: 1, fluidigm: 2, diff --git a/app/models/barcode_printer.rb b/app/models/barcode_printer.rb index 36587d6c80..120135934c 100644 --- a/app/models/barcode_printer.rb +++ b/app/models/barcode_printer.rb @@ -24,10 +24,10 @@ class BarcodePrinter < ApplicationRecord delegate :printer_type_id, to: :barcode_printer_type # this is for Limber. Moving it over to pmb v2 would allow this to be removed. - enum print_service: { 'PMB' => 0, 'SPrint' => 1 } + enum :print_service, { 'PMB' => 0, 'SPrint' => 1 } # it would possibly make more sense to have squix as 0 but this fits with PMB but creates no dependency - enum printer_type: { squix: 1, toshiba: 0 } + enum :printer_type, { squix: 1, toshiba: 0 } def plate384_printer? barcode_printer_type.name == '384 Well Plate' diff --git a/app/models/failure.rb b/app/models/failure.rb index 281c21d7ad..a38a502c37 100644 --- a/app/models/failure.rb +++ b/app/models/failure.rb @@ -1,11 +1,4 @@ # frozen_string_literal: true class Failure < ApplicationRecord belongs_to :failable, polymorphic: true - after_create :notify_remote - - def notify_remote - if notify_remote? - # Send event to Studies here - end - end end diff --git a/app/models/insdc/country.rb b/app/models/insdc/country.rb index fcf370ebf2..0da72bce78 100644 --- a/app/models/insdc/country.rb +++ b/app/models/insdc/country.rb @@ -30,7 +30,7 @@ class Country < ApplicationRecord # Indicates if a region is valid for selection or not # @note This has been implemented as an enum for flexible extension at a later date. # @return [Symbol] :valid or :invalid - enum validation_state: { valid: 0, invalid: 1 }, _suffix: :state + enum :validation_state, { valid: 0, invalid: 1 }, suffix: :state validates :name, presence: true, uniqueness: { case_sensitive: false } validates :sort_priority, presence: true diff --git a/app/models/labware.rb b/app/models/labware.rb index c519c34d20..e45ecb0a89 100644 --- a/app/models/labware.rb +++ b/app/models/labware.rb @@ -11,7 +11,7 @@ class Labware < Asset attr_reader :storage_location_service - enum retention_instruction: { destroy_after_2_years: 0, return_to_customer_after_2_years: 1, long_term_storage: 2 } + enum :retention_instruction, { destroy_after_2_years: 0, return_to_customer_after_2_years: 1, long_term_storage: 2 } delegate :metadata, to: :custom_metadatum_collection, allow_nil: true diff --git a/app/models/location_report.rb b/app/models/location_report.rb index 95c2e7c522..641e3a357c 100644 --- a/app/models/location_report.rb +++ b/app/models/location_report.rb @@ -10,7 +10,7 @@ class LocationReport < ApplicationRecord serialize :plate_purpose_ids, Array serialize :barcodes, Array self.per_page = 20 - enum report_type: { type_selection: 0, type_labwhere: 1 } + enum :report_type, { type_selection: 0, type_labwhere: 1 } # relations belongs_to :study, optional: true diff --git a/app/models/location_report/location_report_form.rb b/app/models/location_report/location_report_form.rb index 3d6405eb3f..e501629a42 100644 --- a/app/models/location_report/location_report_form.rb +++ b/app/models/location_report/location_report_form.rb @@ -24,7 +24,7 @@ class LocationReport::LocationReportForm def name=(input_name) @name = input_name.gsub(/[^A-Za-z0-9_\-.\s]/, '').squish.gsub(/\s/, '_') if input_name.present? - @name = Time.current.to_formatted_s(:number) if input_name.blank? + @name = Time.current.to_fs(:number) if input_name.blank? end def location_barcode=(location_barcode) diff --git a/app/models/pick_list.rb b/app/models/pick_list.rb index 53f01fc8cf..f6a8f49121 100644 --- a/app/models/pick_list.rb +++ b/app/models/pick_list.rb @@ -15,7 +15,7 @@ class PickList < ApplicationRecord belongs_to :submission, optional: false, autosave: true has_many :batches, -> { distinct }, through: :submission - enum state: { pending: 0, built: 1 } + enum :state, { pending: 0, built: 1 } delegate :orders, to: :submission diff --git a/app/models/plate/fluidigm_behaviour.rb b/app/models/plate/fluidigm_behaviour.rb index aa38b1cdb2..c6cc73621e 100644 --- a/app/models/plate/fluidigm_behaviour.rb +++ b/app/models/plate/fluidigm_behaviour.rb @@ -36,7 +36,6 @@ def retrieve_fluidigm_data # rubocop:enable Rails/TransactionExitStatement apply_fluidigm_data(FluidigmFile.new(fluidigm_data.content)) - return true # rubocop:todo Rails/TransactionExitStatement end end diff --git a/app/models/plate/sample_tube_factory.rb b/app/models/plate/sample_tube_factory.rb index 57ff2afeb1..a277dd5e64 100644 --- a/app/models/plate/sample_tube_factory.rb +++ b/app/models/plate/sample_tube_factory.rb @@ -26,10 +26,7 @@ def self.create_sample_tubes_asset_group_and_print_barcodes(plates, barcode_prin plate_barcodes = plates.map(&:barcode_number) asset_group = - AssetGroup.find_or_create_asset_group( - "#{plate_barcodes.join('-')} #{Time.current.to_formatted_s(:sortable)} ", - study - ) + AssetGroup.find_or_create_asset_group("#{plate_barcodes.join('-')} #{Time.current.to_fs(:sortable)} ", study) plates.each do |plate| factory = Plate::SampleTubeFactory.new(plate) next if factory.wells.empty? diff --git a/app/models/presenters/qc_report_presenter.rb b/app/models/presenters/qc_report_presenter.rb index fc9bec3d74..d9e83a0d44 100644 --- a/app/models/presenters/qc_report_presenter.rb +++ b/app/models/presenters/qc_report_presenter.rb @@ -47,7 +47,7 @@ def new_or_all end def created_date - qc_report.created_at.to_formatted_s(:rfc822) + qc_report.created_at.to_fs(:rfc822) end def state_description diff --git a/app/models/product.rb b/app/models/product.rb index 8f00522c3c..6a3e8203ba 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -23,6 +23,6 @@ def stock_criteria end def display_name - deprecated? ? "#{name} (Deprecated #{deprecated_at.to_formatted_s(:iso8601)})" : name + deprecated? ? "#{name} (Deprecated #{deprecated_at.to_fs(:iso8601)})" : name end end diff --git a/app/models/qc_report.rb b/app/models/qc_report.rb index d45215ab9e..98cb0ada60 100644 --- a/app/models/qc_report.rb +++ b/app/models/qc_report.rb @@ -168,7 +168,7 @@ def identifier_required? def generate_report_identifier return true if study.nil? || product_criteria.nil? - rid = [study.abbreviation, product_criteria.product.name, DateTime.now.to_formatted_s(:number)].compact + rid = [study.abbreviation, product_criteria.product.name, DateTime.now.to_fs(:number)].compact .join('_') .downcase .gsub(/[^\w]/, '_') diff --git a/app/models/request.rb b/app/models/request.rb index b0ba00cec7..4bafbd39bd 100644 --- a/app/models/request.rb +++ b/app/models/request.rb @@ -108,7 +108,7 @@ def date_for_state(state) # cf. RequestType which defines how it will be fulfilled. # Both RequestType and Request have a purpose, with the former acting as the default for # the latter. - enum request_purpose: { standard: 1, internal: 2, qc: 3, control: 4 } + enum :request_purpose, { standard: 1, internal: 2, qc: 3, control: 4 } # Validations # On create we perform a full and complete validation. diff --git a/app/models/request_type.rb b/app/models/request_type.rb index 659597d926..0f4f59d3c3 100644 --- a/app/models/request_type.rb +++ b/app/models/request_type.rb @@ -68,7 +68,7 @@ class RequestTypePlatePurpose < ApplicationRecord # While a request type describes what a request is, a request purpose describes why it is being done. # ie. standard, qc, internal # The value on request type acts as a default for requests - enum request_purpose: { standard: 1, internal: 2, qc: 3, control: 4 } + enum :request_purpose, { standard: 1, internal: 2, qc: 3, control: 4 } belongs_to :product_line @@ -82,7 +82,7 @@ class RequestTypePlatePurpose < ApplicationRecord # eg. library_creation has a lower order than sequencing validates :order, presence: true validates :order, numericality: { integer_only: true } - validates :morphology, numericality: { in: MORPHOLOGIES } + validates :morphology, numericality: { in: 0...MORPHOLOGIES.length } validates :request_class, presence: true, inclusion: { in: ->(_) { [Request, *Request.descendants] } } serialize :request_parameters diff --git a/app/models/sample.rb b/app/models/sample.rb index adb70d7c77..105b86ef96 100644 --- a/app/models/sample.rb +++ b/app/models/sample.rb @@ -359,9 +359,9 @@ def release message: 'should be blank if "control" is set to false' } - enum control_type: { negative: 0, positive: 1, 'pcr negative': 2, 'pcr positive': 3, 'lysate negative': 4 } + enum :control_type, { negative: 0, positive: 1, 'pcr negative': 2, 'pcr positive': 3, 'lysate negative': 4 } - enum priority: { no_priority: 0, backlog: 1, surveillance: 2, priority: 3 } + enum :priority, { no_priority: 0, backlog: 1, surveillance: 2, priority: 3 } # this method has to be before validation_guarded_by def rename_to!(new_name) diff --git a/app/models/sample_manifest.rb b/app/models/sample_manifest.rb index 2418ab3fb2..8bd5b400b3 100644 --- a/app/models/sample_manifest.rb +++ b/app/models/sample_manifest.rb @@ -128,7 +128,7 @@ def name end def default_filename - "#{study_id}stdy_manifest_#{id}_#{created_at.to_formatted_s(:dmy)}" + "#{study_id}stdy_manifest_#{id}_#{created_at.to_fs(:dmy)}" end # Number of rows per well in the manifest file, specified in manifest_types.yml. diff --git a/app/models/tube_rack_status.rb b/app/models/tube_rack_status.rb index 0574ea1952..c413f93b68 100644 --- a/app/models/tube_rack_status.rb +++ b/app/models/tube_rack_status.rb @@ -2,7 +2,7 @@ # A TubeRackStatus stores the status of the creation process of tube racks class TubeRackStatus < ApplicationRecord - enum status: { created: 0, validation_failed: 1 } + enum :status, { created: 0, validation_failed: 1 } validates :barcode, presence: true validates :status, presence: true diff --git a/config/application.rb b/config/application.rb index ea862d1b5c..2158cb9183 100644 --- a/config/application.rb +++ b/config/application.rb @@ -24,7 +24,7 @@ module Sequencescape class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 6.1 + config.load_defaults 7.0 # Default options which predate the Rails 5 switch config.active_record.belongs_to_required_by_default = false diff --git a/config/initializers/bulk_submission_excel.rb b/config/initializers/bulk_submission_excel.rb index 9d1688389c..d9dbe6d3d4 100644 --- a/config/initializers/bulk_submission_excel.rb +++ b/config/initializers/bulk_submission_excel.rb @@ -1,8 +1,10 @@ # frozen_string_literal: true -unless Rails.env.test? - BulkSubmissionExcel.configure do |config| - config.folder = File.join('config', 'bulk_submission_excel') - config.load! +Rails.application.config.to_prepare do + unless Rails.env.test? + BulkSubmissionExcel.configure do |config| + config.folder = File.join('config', 'bulk_submission_excel') + config.load! + end end end diff --git a/config/initializers/jsonapi_resources.rb b/config/initializers/jsonapi_resources.rb index ffcd42b3e5..b180f1ba08 100644 --- a/config/initializers/jsonapi_resources.rb +++ b/config/initializers/jsonapi_resources.rb @@ -1,17 +1,18 @@ # frozen_string_literal: true -JSONAPI.configure do |config| - # built in paginators are :none, :offset, :paged - config.default_paginator = :paged - config.default_page_size = 100 - config.maximum_page_size = 500 +# +Rails.application.config.to_prepare do + JSONAPI.configure do |config| + # built in paginators are :none, :offset, :paged + config.default_paginator = :paged + config.default_page_size = 100 + config.maximum_page_size = 500 - #:underscored_key, :camelized_key, :dasherized_key, or custom - config.json_key_format = :underscored_key - config.route_format = :underscored_route -end + #:underscored_key, :camelized_key, :dasherized_key, or custom + config.json_key_format = :underscored_key + config.route_format = :underscored_route + end -# Monkey patch the ApiKeyAuthenticatable concern into all JSONAPI::ResourceControllers -class JSONAPI::ResourceController - include Api::V2::Concerns::ApiKeyAuthenticatable - include Api::V2::Concerns::DisableCsrfTokenAuthentication + # Monkey patch the ApiKeyAuthenticatable concern into all JSONAPI::ResourceControllers + JSONAPI::ResourceController.include(Api::V2::Concerns::ApiKeyAuthenticatable) + JSONAPI::ResourceController.include(Api::V2::Concerns::DisableCsrfTokenAuthentication) end diff --git a/config/initializers/sample_manifest_excel.rb b/config/initializers/sample_manifest_excel.rb index 0aa7d7b30c..7b950de69a 100644 --- a/config/initializers/sample_manifest_excel.rb +++ b/config/initializers/sample_manifest_excel.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true -require Rails.root.join('app', 'sample_manifest_excel', 'sample_manifest_excel') -unless Rails.env.test? - SampleManifestExcel.configure do |config| - config.folder = File.join('config', 'sample_manifest_excel') - config.tag_group = 'Magic Tag Group' - config.load! +Rails.application.config.to_prepare do + unless Rails.env.test? + SampleManifestExcel.configure do |config| + config.folder = File.join('config', 'sample_manifest_excel') + config.tag_group = 'Magic Tag Group' + config.load! + end end end diff --git a/db/schema.rb b/db/schema.rb index f74311f721..11da36d9d8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,14 +10,13 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_11_06_103710) do - +ActiveRecord::Schema[7.0].define(version: 2024_11_06_103710) do create_table "aliquot_indices", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "aliquot_id", null: false t.integer "lane_id", null: false t.integer "aliquot_index", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["aliquot_id"], name: "index_aliquot_indices_on_aliquot_id", unique: true t.index ["lane_id", "aliquot_index"], name: "index_aliquot_indices_on_lane_id_and_aliquot_index", unique: true end @@ -32,8 +31,8 @@ t.string "library_type" t.integer "insert_size_from" t.integer "insert_size_to" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "bait_library_id" t.integer "tag2_id", default: -1 t.boolean "suboptimal", default: false, null: false @@ -64,8 +63,8 @@ t.string "key" t.string "created_by" t.integer "asset_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "witnessed_by" t.json "metadata" t.index ["asset_id"], name: "index_asset_audits_on_asset_id" @@ -77,8 +76,8 @@ create_table "asset_creation_parents", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "asset_creation_id" t.integer "parent_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "asset_creations", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -86,16 +85,16 @@ t.integer "parent_id" t.integer "child_purpose_id" t.integer "child_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "type", null: false end create_table "asset_group_assets", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "asset_id" t.integer "asset_group_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["asset_group_id"], name: "index_asset_group_assets_on_asset_group_id" t.index ["asset_id"], name: "index_asset_group_assets_on_asset_id" end @@ -104,8 +103,8 @@ t.string "name" t.integer "user_id" t.integer "study_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "asset_links", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -113,8 +112,8 @@ t.integer "descendant_id" t.boolean "direct" t.integer "count" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["ancestor_id", "descendant_id"], name: "index_asset_links_on_ancestor_id_and_descendant_id", unique: true t.index ["ancestor_id", "direct"], name: "index_asset_links_on_ancestor_id_and_direct" t.index ["descendant_id", "direct"], name: "index_asset_links_on_descendant_id_and_direct" @@ -125,8 +124,8 @@ t.integer "horizontal_ratio", null: false t.integer "vertical_ratio", null: false t.string "description_strategy", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "assets_deprecated", id: :integer, charset: "latin1", force: :cascade do |t| @@ -136,8 +135,8 @@ t.string "barcode_bkp" t.string "qc_state", limit: 20 t.boolean "resource" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "map_id" t.integer "size" t.boolean "closed", default: false @@ -166,8 +165,8 @@ t.string "name", null: false t.string "supplier_identifier" t.string "target_species", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "bait_library_type_id", null: false t.boolean "visible", default: true, null: false t.index ["bait_library_supplier_id", "name"], name: "bait_library_names_are_unique_within_a_supplier", unique: true @@ -177,22 +176,22 @@ t.integer "user_id" t.integer "plate_id", null: false t.string "layout", limit: 1024 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["plate_id"], name: "bait_libraries_are_laid_out_on_a_plate_once", unique: true end create_table "bait_library_suppliers", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "visible", default: true, null: false end create_table "bait_library_types", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "visible", default: true, null: false t.integer "category" t.index ["name"], name: "index_bait_library_types_on_name", unique: true @@ -207,8 +206,8 @@ t.string "name" t.integer "printer_type_id" t.string "type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "label_template_name" t.index ["name"], name: "index_barcode_printer_types_on_name" t.index ["type"], name: "index_barcode_printer_types_on_type" @@ -217,8 +216,8 @@ create_table "barcode_printers", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" t.boolean "active" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "barcode_printer_type_id" t.integer "print_service", default: 0 t.integer "printer_type", default: 1 @@ -228,8 +227,8 @@ t.integer "asset_id", null: false t.string "barcode", null: false t.integer "format", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["asset_id"], name: "index_barcodes_on_asset_id" t.index ["barcode"], name: "index_barcodes_on_barcode" end @@ -238,17 +237,17 @@ t.integer "batch_id", null: false t.integer "request_id", null: false t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["batch_id"], name: "index_batch_requests_on_batch_id" t.index ["request_id"], name: "request_id", unique: true end create_table "batches", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "item_limit" - t.datetime "created_at" + t.datetime "created_at", precision: nil t.integer "user_id" - t.datetime "updated_at" + t.datetime "updated_at", precision: nil t.integer "pipeline_id" t.string "state", limit: 20 t.integer "assignee_id" @@ -267,8 +266,8 @@ t.text "descriptor_fields", size: :medium t.integer "eventful_id" t.string "eventful_type", limit: 50 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "filename" t.binary "data" t.text "message", size: :medium @@ -282,19 +281,19 @@ t.integer "seed_id" t.integer "user_id" t.text "properties", size: :medium - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "budget_divisions", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "bulk_transfers", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "user_id" end @@ -303,8 +302,8 @@ t.string "commentable_type", limit: 50 t.integer "user_id" t.text "description", size: :medium - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "commentable_id", null: false t.index ["commentable_id", "commentable_type"], name: "index_comments_on_commentable_id_and_commentable_type" end @@ -320,16 +319,16 @@ t.string "name" t.integer "item_id" t.integer "pipeline_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "custom_metadata", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "key" t.string "value" t.integer "custom_metadatum_collection_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["custom_metadatum_collection_id"], name: "index_custom_metadata_on_custom_metadatum_collection_id" t.index ["key", "value"], name: "index_custom_metadata_on_key_and_value" end @@ -337,8 +336,8 @@ create_table "custom_metadatum_collections", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "user_id" t.integer "asset_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["asset_id"], name: "index_custom_metadatum_collections_on_asset_id" end @@ -347,14 +346,14 @@ t.integer "differential" t.string "content_type" t.text "content", size: :medium - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "data_release_study_types", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "for_array_express", default: false t.boolean "is_default", default: false t.boolean "is_assay_type", default: false @@ -373,12 +372,12 @@ t.integer "attempts", default: 0 t.text "handler", size: :medium t.text "last_error", size: :medium - t.datetime "run_at" - t.datetime "locked_at" - t.datetime "failed_at" + t.datetime "run_at", precision: nil + t.datetime "locked_at", precision: nil + t.datetime "failed_at", precision: nil t.string "locked_by" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "queue" end @@ -422,8 +421,8 @@ t.string "eventful_type", limit: 50 t.string "message" t.string "family" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "identifier" t.string "location" t.boolean "actioned" @@ -439,8 +438,8 @@ create_table "extended_validators", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "behaviour", null: false t.text "options", size: :medium - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "external_properties", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -448,8 +447,8 @@ t.string "propertied_type", limit: 50 t.string "key", limit: 50 t.string "value" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["propertied_id", "propertied_type", "key"], name: "ep_pi_pt_key" end @@ -457,14 +456,14 @@ t.integer "target_id" t.string "created_by" t.text "attributes_update", size: :long - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "faculty_sponsors", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "failures", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -472,16 +471,16 @@ t.string "failable_type", limit: 50 t.text "reason", size: :medium t.boolean "notify_remote" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.text "comment", size: :medium t.index ["failable_id"], name: "index_failures_on_failable_id" end create_table "flipper_features", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t| t.string "key", null: false - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["key"], name: "index_flipper_features_on_key", unique: true end @@ -489,23 +488,23 @@ t.string "feature_key", null: false t.string "key", null: false t.string "value" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["feature_key", "key", "value"], name: "index_flipper_gates_on_feature_key_and_key_and_value", unique: true end create_table "flowcell_types", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t| t.string "name" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["name"], name: "index_flowcell_types_on_name", unique: true end create_table "flowcell_types_request_types", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t| t.bigint "flowcell_type_id", null: false t.integer "request_type_id", null: false - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["flowcell_type_id"], name: "index_flowcell_types_request_types_on_flowcell_type_id" t.index ["request_type_id"], name: "index_flowcell_types_request_types_on_request_type_id" end @@ -533,16 +532,16 @@ t.string "name", null: false t.integer "sort_priority", default: 0, null: false t.integer "validation_state", default: 0, null: false - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["name"], name: "index_isndc_countries_on_name", unique: true t.index ["sort_priority"], name: "index_isndc_countries_on_sort_priority" t.index ["validation_state"], name: "index_isndc_countries_on_validation_state" end create_table "items", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "name" t.integer "study_id" t.integer "user_id" @@ -561,8 +560,8 @@ t.text "descriptors", size: :medium t.integer "eventful_id" t.string "eventful_type", limit: 50 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.text "message", size: :medium t.integer "user_id" t.integer "batch_id" @@ -580,8 +579,8 @@ t.string "two_dimensional_barcode" t.integer "plate_purpose_id" t.integer "labware_type_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "retention_instruction" t.index ["labware_type_id"], name: "fk_rails_32b35f8bf9" t.index ["plate_purpose_id"], name: "fk_rails_745455e964" @@ -593,14 +592,14 @@ create_table "lane_metadata", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "lane_id" t.string "release_reason" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "library_types", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["name"], name: "index_library_types_on_name", unique: true end @@ -608,8 +607,8 @@ t.integer "request_type_id", null: false t.integer "library_type_id", null: false t.boolean "is_default", default: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["library_type_id"], name: "fk_library_types_request_types_to_library_types" t.index ["request_type_id"], name: "fk_library_types_request_types_to_request_types" end @@ -623,11 +622,11 @@ t.string "faculty_sponsor_ids" t.bigint "study_id" t.string "plate_purpose_ids" - t.datetime "start_date" - t.datetime "end_date" + t.datetime "start_date", precision: nil + t.datetime "end_date", precision: nil t.string "report_filename" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["study_id"], name: "index_location_reports_on_study_id" t.index ["user_id"], name: "index_location_reports_on_user_id" end @@ -636,8 +635,8 @@ t.string "name", null: false t.string "template_class", null: false t.integer "target_purpose_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["target_purpose_id"], name: "fk_lot_types_to_plate_purposes" end @@ -648,8 +647,8 @@ t.string "template_type", null: false t.integer "user_id", null: false t.date "received_at", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["lot_number", "lot_type_id"], name: "index_lot_number_lot_type_id", unique: true t.index ["lot_type_id"], name: "fk_lots_to_lot_types" end @@ -669,8 +668,8 @@ t.string "template", null: false t.string "root", null: false t.integer "purpose_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "target_finder_class", default: "SelfFinder", null: false t.index ["purpose_id"], name: "fk_messenger_creators_to_plate_purposes" end @@ -680,21 +679,21 @@ t.string "target_type" t.string "root", null: false t.string "template", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["target_id", "target_type"], name: "index_messengers_on_target_id_and_target_type" end create_table "order_roles", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "role" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "orders", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "study_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "state_to_delete", limit: 20 t.string "message_to_delete" t.integer "user_id" @@ -722,8 +721,8 @@ t.string "movie_length" t.integer "pac_bio_library_tube_id" t.string "protocol" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["pac_bio_library_tube_id"], name: "index_pac_bio_library_tube_metadata_on_pac_bio_library_tube_id" end @@ -732,30 +731,30 @@ t.string "name" t.string "permissable_type", limit: 50 t.integer "permissable_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "pick_lists", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "state", default: 0, null: false t.integer "submission_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["submission_id"], name: "index_pick_lists_on_submission_id" end create_table "pipeline_request_information_types", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "pipeline_id" t.integer "request_information_type_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "pipelines", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" t.boolean "active", default: true - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "multiplexed" t.string "sti_type", limit: 50 t.integer "sorter" @@ -779,29 +778,29 @@ t.integer "target_id", null: false t.integer "purpose_id", null: false t.integer "user_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "parent_id" end create_table "plate_creator_parent_purposes", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "plate_creator_id", null: false t.integer "plate_purpose_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "plate_creator_purposes", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "plate_creator_id", null: false t.integer "plate_purpose_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "plate_creators", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.text "valid_options", size: :medium t.index ["name"], name: "index_plate_creators_on_name", unique: true end @@ -809,8 +808,8 @@ create_table "plate_metadata", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "plate_id" t.string "infinium_barcode_bkp" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "fluidigm_barcode_bkp", limit: 10 t.decimal "dilution_factor", precision: 5, scale: 2, default: "1.0" t.index ["fluidigm_barcode_bkp"], name: "index_on_fluidigm_barcode", unique: true @@ -820,8 +819,8 @@ create_table "plate_owners", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "user_id", null: false t.integer "plate_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "eventable_id", null: false t.string "eventable_type", null: false end @@ -833,8 +832,8 @@ create_table "plate_purposes", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "type" t.string "target_type", limit: 30 t.boolean "stock_plate", default: false, null: false @@ -855,16 +854,16 @@ create_table "plate_types", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" t.integer "maximum_volume" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "plate_volumes", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "barcode" t.string "uploaded_file_name" t.string "state" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["uploaded_file_name"], name: "index_plate_volumes_on_uploaded_file_name" end @@ -873,8 +872,8 @@ t.string "value", null: false t.string "metadatable_type", null: false t.bigint "metadatable_id", null: false - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["metadatable_type", "metadatable_id"], name: "index_poly_metadata_on_metadatable_type_and_metadatable_id" end @@ -890,23 +889,23 @@ end create_table "pre_capture_pools", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "primer_panels", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false t.integer "snp_count", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.text "programs", size: :medium end create_table "product_catalogues", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false t.string "selection_behaviour", default: "SingleProduct", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "product_criteria", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -914,9 +913,9 @@ t.string "stage", null: false t.string "behaviour", default: "Basic", null: false t.text "configuration", size: :medium - t.datetime "deprecated_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "deprecated_at", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "version" t.index ["product_id", "stage", "version"], name: "index_product_criteria_on_product_id_and_stage_and_version", unique: true end @@ -929,29 +928,29 @@ t.integer "product_id", null: false t.integer "product_catalogue_id", null: false t.string "selection_criterion" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["product_catalogue_id"], name: "fk_product_product_catalogues_to_product_catalogues" t.index ["product_id"], name: "fk_product_product_catalogues_to_products" end create_table "products", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.datetime "deprecated_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "deprecated_at", precision: nil end create_table "programs", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "project_managers", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "project_metadata", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -965,8 +964,8 @@ t.string "gt_committee_tracking_id" t.integer "project_manager_id", default: 1 t.integer "budget_division_id", default: 1 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["project_id"], name: "index_project_metadata_on_project_id" end @@ -975,16 +974,16 @@ t.boolean "enforce_quotas", default: true t.boolean "approved", default: false t.string "state", limit: 20, default: "pending" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["approved"], name: "index_projects_on_approved" t.index ["enforce_quotas"], name: "index_projects_on_enforce_quotas" t.index ["state"], name: "index_projects_on_state" end create_table "qc_assays", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.string "lot_number" end @@ -992,15 +991,15 @@ t.integer "qc_decision_id", null: false t.integer "qcable_id", null: false t.string "decision", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "qc_decisions", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "lot_id", null: false t.integer "user_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "qc_files", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -1008,16 +1007,16 @@ t.integer "size" t.string "content_type" t.string "filename" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["asset_id"], name: "fk_rails_31d6eeacb9" end create_table "qc_metric_requests", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "qc_metric_id", null: false t.integer "request_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["qc_metric_id"], name: "fk_qc_metric_requests_to_qc_metrics" t.index ["request_id"], name: "fk_qc_metric_requests_to_requests" end @@ -1028,8 +1027,8 @@ t.text "metrics", size: :medium t.string "qc_decision", null: false t.boolean "proceed" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["asset_id"], name: "fk_qc_metrics_to_assets" t.index ["qc_report_id"], name: "fk_qc_metrics_to_qc_reports" end @@ -1040,8 +1039,8 @@ t.integer "product_criteria_id", null: false t.boolean "exclude_existing", null: false t.string "state" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.text "plate_purposes", size: :medium t.index ["product_criteria_id"], name: "fk_qc_reports_to_product_criteria" t.index ["report_identifier"], name: "index_qc_reports_on_report_identifier", unique: true @@ -1056,8 +1055,8 @@ t.float "cv" t.string "assay_type" t.string "assay_version" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.bigint "qc_assay_id" t.index ["asset_id"], name: "index_qc_results_on_asset_id" t.index ["qc_assay_id"], name: "index_qc_results_on_qc_assay_id" @@ -1066,8 +1065,8 @@ create_table "qcable_creators", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "lot_id", null: false t.integer "user_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["user_id"], name: "fk_qcable_creators_to_users" end @@ -1075,8 +1074,8 @@ t.integer "lot_id", null: false t.integer "asset_id", null: false t.string "state", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "qcable_creator_id", null: false t.index ["asset_id"], name: "index_asset_id" t.index ["lot_id"], name: "index_lot_id" @@ -1086,8 +1085,8 @@ t.bigint "tube_rack_id" t.bigint "tube_id" t.string "coordinate" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["tube_id"], name: "index_racked_tubes_on_tube_id" t.index ["tube_rack_id"], name: "index_racked_tubes_on_tube_rack_id" end @@ -1102,8 +1101,8 @@ t.decimal "volume", precision: 10, scale: 2 t.decimal "concentration", precision: 18, scale: 8 t.integer "labware_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "pcr_cycles" t.boolean "submit_for_sequencing" t.integer "sub_pool" @@ -1116,8 +1115,8 @@ create_table "reference_genomes", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "request_events", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -1125,8 +1124,8 @@ t.string "event_name", null: false t.string "from_state" t.string "to_state" - t.datetime "current_from", null: false - t.datetime "current_to" + t.datetime "current_from", precision: nil, null: false + t.datetime "current_to", precision: nil t.index ["request_id", "current_to"], name: "index_request_events_on_request_id_and_current_to" end @@ -1136,8 +1135,8 @@ t.string "label" t.integer "width" t.string "data_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "hide_in_inbox" end @@ -1145,8 +1144,8 @@ t.integer "request_id" t.integer "request_information_type_id" t.string "value" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "request_metadata", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -1165,8 +1164,8 @@ t.string "sequencing_type" t.integer "insert_size" t.integer "bait_library_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "pre_capture_plex_level" t.float "gigabases_expected" t.integer "target_purpose_id" @@ -1190,8 +1189,8 @@ t.integer "request_type_id", null: false t.string "request_option", null: false t.text "valid_options", size: :medium, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "key" t.index ["key"], name: "index_request_type_validators_on_key", unique: true end @@ -1199,8 +1198,8 @@ create_table "request_types", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "key", limit: 100 t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "asset_type" t.integer "order" t.string "initial_state", limit: 20 @@ -1224,16 +1223,16 @@ create_table "request_types_extended_validators", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "request_type_id", null: false t.integer "extended_validator_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["extended_validator_id"], name: "fk_request_types_extended_validators_to_extended_validators" t.index ["request_type_id"], name: "fk_request_types_extended_validators_to_request_types" end create_table "requests", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "initial_study_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "user_id" t.string "state", limit: 20, default: "pending" t.integer "sample_pool_id" @@ -1267,15 +1266,15 @@ t.string "value" t.string "key", limit: 50 t.integer "robot_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "robots", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" t.string "location" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "barcode" end @@ -1283,8 +1282,8 @@ t.string "name" t.string "authorizable_type", limit: 50 t.integer "authorizable_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["authorizable_id", "authorizable_type"], name: "index_roles_on_authorizable_id_and_authorizable_type" t.index ["authorizable_id"], name: "index_roles_on_authorizable_id" t.index ["name"], name: "index_roles_on_name" @@ -1293,8 +1292,8 @@ create_table "roles_users", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "role_id" t.integer "user_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["role_id"], name: "index_roles_users_on_role_id" t.index ["user_id"], name: "index_roles_users_on_user_id" end @@ -1302,24 +1301,24 @@ create_table "sample_compounds_components", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "compound_sample_id", null: false t.integer "component_sample_id", null: false - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "sample_manifest_assets", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.bigint "sample_manifest_id" t.bigint "asset_id" t.string "sanger_sample_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["asset_id"], name: "index_sample_manifest_assets_on_asset_id" t.index ["sample_manifest_id"], name: "index_sample_manifest_assets_on_sample_manifest_id" t.index ["sanger_sample_id"], name: "index_sample_manifest_assets_on_sanger_sample_id" end create_table "sample_manifests", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "study_id" t.integer "project_id" t.integer "supplier_id" @@ -1388,11 +1387,11 @@ t.string "disease" t.string "subject" t.string "treatment" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "donor_id" t.integer "genome_size" - t.datetime "date_of_consent_withdrawn" + t.datetime "date_of_consent_withdrawn", precision: nil t.integer "user_id_of_consent_withdrawn" t.boolean "consent_withdrawn", default: false, null: false t.string "collected_by", comment: "Name of persons or institute who collected the specimen" @@ -1412,8 +1411,8 @@ create_table "samples", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" t.boolean "new_name_format", default: true - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "sanger_sample_id" t.integer "sample_manifest_id" t.boolean "control" @@ -1436,8 +1435,8 @@ create_table "searches", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" t.string "type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "target_model_name" t.text "default_parameters", size: :medium end @@ -1445,8 +1444,8 @@ create_table "specific_tube_creation_purposes", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "specific_tube_creation_id" t.integer "tube_purpose_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "stamp_qcables", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -1454,8 +1453,8 @@ t.integer "qcable_id", null: false t.string "bed", null: false t.integer "order", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["qcable_id"], name: "fk_stamp_qcables_to_qcables" t.index ["stamp_id"], name: "fk_stamp_qcables_to_stamps" end @@ -1465,8 +1464,8 @@ t.integer "user_id", null: false t.integer "robot_id", null: false t.string "tip_lot", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["lot_id"], name: "fk_stamps_to_lots" t.index ["robot_id"], name: "fk_stamps_to_robots" t.index ["user_id"], name: "fk_stamps_to_users" @@ -1478,15 +1477,15 @@ t.string "contents", limit: 4096 t.string "previous_state" t.string "target_state" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "reason" end create_table "studies", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "user_id" t.boolean "blocked", default: false t.string "state", limit: 20 @@ -1537,8 +1536,8 @@ t.integer "faculty_sponsor_id" t.float "number_of_gigabases_per_sample" t.string "hmdmc_approval_number" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "remove_x_and_autosomes", default: "No", null: false t.string "dac_policy_title" t.boolean "separate_y_chromosome_data", default: false, null: false @@ -1554,8 +1553,8 @@ create_table "study_reports", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "study_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "user_id" t.string "report_filename" t.string "content_type", default: "text/csv" @@ -1566,8 +1565,8 @@ create_table "study_samples", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "study_id", null: false t.integer "sample_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["sample_id", "study_id"], name: "unique_samples_in_studies_idx", unique: true t.index ["sample_id"], name: "index_project_samples_on_sample_id" t.index ["study_id"], name: "index_project_samples_on_project_id" @@ -1576,8 +1575,8 @@ create_table "study_types", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" t.boolean "valid_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "valid_for_creation", default: true, null: false end @@ -1586,8 +1585,8 @@ t.string "value" t.integer "attributable_id" t.string "attributable_type", limit: 50 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["attributable_id", "name"], name: "index_subclass_attributes_on_attributable_id_and_name" end @@ -1595,19 +1594,19 @@ t.string "name" t.string "submission_class_name" t.text "submission_parameters", size: :medium - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "product_line_id" t.integer "superceded_by_id", default: -1, null: false - t.datetime "superceded_at" + t.datetime "superceded_at", precision: nil t.integer "product_catalogue_id" t.index ["name", "superceded_by_id"], name: "name_and_superceded_by_unique_idx", unique: true t.index ["product_catalogue_id"], name: "fk_submission_templates_to_product_catalogues" end create_table "submissions", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "state", limit: 20 t.string "message" t.integer "user_id" @@ -1622,15 +1621,15 @@ create_table "submitted_assets", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "order_id" t.integer "asset_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["asset_id"], name: "index_submitted_assets_on_asset_id" end create_table "suppliers", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "email" t.string "address" t.string "contact_name" @@ -1644,8 +1643,8 @@ create_table "tag2_layout_template_submissions", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "submission_id", null: false t.integer "tag2_layout_template_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["submission_id", "tag2_layout_template_id"], name: "tag2_layouts_used_once_per_submission", unique: true t.index ["tag2_layout_template_id"], name: "fk_tag2_layout_template_submissions_to_tag2_layout_templates" end @@ -1653,30 +1652,30 @@ create_table "tag2_layout_templates", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false t.integer "tag_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "tag2_layouts", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "tag_id" t.integer "plate_id" t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "source_id" t.text "target_well_locations", size: :medium end create_table "tag_group_adapter_types", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "tag_groups", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "visible", default: true t.bigint "adapter_type_id" t.index ["adapter_type_id"], name: "index_tag_groups_on_adapter_type_id" @@ -1687,8 +1686,8 @@ t.integer "submission_id", null: false t.integer "tag_layout_template_id", null: false t.boolean "enforce_uniqueness" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["submission_id", "tag_layout_template_id", "enforce_uniqueness"], name: "tag_layout_uniqueness", unique: true t.index ["submission_id"], name: "index_tag_layout_template_submissions_on_submission_id" t.index ["tag_layout_template_id"], name: "index_tag_layout_template_submissions_on_tag_layout_template_id" @@ -1698,8 +1697,8 @@ t.string "direction_algorithm" t.integer "tag_group_id" t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "walking_algorithm", default: "TagLayout::WalkWellsByPools" t.integer "tag2_group_id" t.boolean "enabled", default: true, null: false @@ -1711,8 +1710,8 @@ t.integer "tag_group_id" t.integer "plate_id" t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "substitutions", limit: 1525 t.string "walking_algorithm", default: "TagLayout::WalkWellsByPools" t.integer "initial_tag", default: 0, null: false @@ -1724,8 +1723,8 @@ t.string "name", null: false t.integer "tag_group_id", null: false t.integer "tag2_group_id" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["tag2_group_id"], name: "index_tag_sets_on_tag2_group_id" t.index ["tag_group_id"], name: "index_tag_sets_on_tag_group_id" end @@ -1734,8 +1733,8 @@ t.string "oligo" t.integer "map_id" t.integer "tag_group_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["map_id"], name: "index_tags_on_map_id" t.index ["tag_group_id"], name: "index_tags_on_tag_group_id" end @@ -1760,22 +1759,22 @@ create_table "transfer_request_collection_transfer_requests", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "transfer_request_collection_id" t.integer "transfer_request_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["transfer_request_collection_id"], name: "fk_rails_6b9c820b32" t.index ["transfer_request_id"], name: "fk_rails_67a3295574" end create_table "transfer_request_collections", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "user_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["user_id"], name: "fk_rails_e542f48171" end create_table "transfer_requests", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "state", limit: 20, default: "pending" t.integer "asset_id" t.integer "target_asset_id" @@ -1788,16 +1787,16 @@ end create_table "transfer_templates", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "name" t.string "transfer_class_name" t.string "transfers", limit: 10240 end create_table "transfers", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "sti_type" t.integer "source_id" t.integer "destination_id" @@ -1808,8 +1807,8 @@ end create_table "tube_creation_children", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "tube_creation_id", null: false t.integer "tube_id", null: false end @@ -1819,8 +1818,8 @@ t.integer "status", null: false t.text "messages", size: :medium t.integer "labware_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "users", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -1828,17 +1827,17 @@ t.string "email" t.string "crypted_password", limit: 40 t.string "salt", limit: 40 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "remember_token" - t.datetime "remember_token_expires_at" + t.datetime "remember_token_expires_at", precision: nil t.string "api_key" t.string "first_name" t.string "last_name" t.boolean "pipeline_administrator" t.string "barcode" t.string "cookie" - t.datetime "cookie_validated_at" + t.datetime "cookie_validated_at", precision: nil t.string "encrypted_swipecard_code", limit: 40 t.index ["barcode"], name: "index_users_on_barcode" t.index ["encrypted_swipecard_code"], name: "index_users_on_encrypted_swipecard_code" @@ -1858,8 +1857,8 @@ t.integer "target_id" t.string "created_by" t.float "volume_change" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "well_attributes", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| @@ -1870,8 +1869,8 @@ t.float "buffer_volume" t.float "requested_volume" t.float "picked_volume" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "pico_pass", default: "ungraded", null: false t.integer "sequenom_count" t.string "study_id" @@ -1901,8 +1900,8 @@ create_table "work_completions", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "user_id", null: false t.integer "target_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["target_id"], name: "fk_rails_f8fb9e95de" t.index ["user_id"], name: "fk_rails_204fc81a92" end @@ -1916,15 +1915,15 @@ create_table "work_order_types", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["name"], name: "index_work_order_types_on_name", unique: true end create_table "work_orders", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.integer "work_order_type_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.string "state", null: false t.index ["work_order_type_id", "state"], name: "index_work_orders_on_work_order_type_id_and_state" end @@ -1932,8 +1931,8 @@ create_table "workflow_samples", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.text "name", size: :medium t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.boolean "control", default: false t.integer "workflow_id" t.integer "submission_id" diff --git a/features/api/uuid_lookup_service.feature b/features/api/uuid_lookup_service.feature index 0a87e22187..23bbd1d2f3 100644 --- a/features/api/uuid_lookup_service.feature +++ b/features/api/uuid_lookup_service.feature @@ -75,7 +75,7 @@ And I have a "full" authorised user with the key "cucumber" And the JSON should be: """ { - "general": [ "Couldn't find Uuid" ] + "general": [ "Couldn't find Uuid with [WHERE `uuids`.`resource_type` = ? AND `uuids`.`resource_id` = ?]" ] } """ diff --git a/spec/features/batches/failing_requests_spec.rb b/spec/features/batches/failing_requests_spec.rb index b2afac1c82..2b849cce66 100644 --- a/spec/features/batches/failing_requests_spec.rb +++ b/spec/features/batches/failing_requests_spec.rb @@ -5,12 +5,17 @@ describe 'Batches controller', :js do let(:request_count) { 3 } + let(:plate) { create(:plate, well_count: 3) } + let(:destination_plate) { create(:plate, well_count: 3) } let(:batch) do create( :cherrypick_batch, - request_count: request_count, state: 'released', - request_factory: :passed_cherrypick_request + request_attributes: [ + { asset: plate.wells[0], target_asset: destination_plate.wells[0], state: 'passed' }, + { asset: plate.wells[1], target_asset: destination_plate.wells[1], state: 'passed' }, + { asset: plate.wells[2], target_asset: destination_plate.wells[2], state: 'passed' } + ] ) end let(:user) { create(:admin) } diff --git a/spec/models/broadcast_event/broadcast_event_spec.rb b/spec/models/broadcast_event/broadcast_event_spec.rb index e98ea36287..76558cef40 100644 --- a/spec/models/broadcast_event/broadcast_event_spec.rb +++ b/spec/models/broadcast_event/broadcast_event_spec.rb @@ -29,7 +29,7 @@ def self.primary_key end def self.polymorphic_name - 'test_seed' + 'TestSeed' end def attributes diff --git a/spec/views/samples/index_html_erb_spec.rb b/spec/views/samples/index_html_erb_spec.rb index ccee843d85..1fd8cbd88d 100644 --- a/spec/views/samples/index_html_erb_spec.rb +++ b/spec/views/samples/index_html_erb_spec.rb @@ -34,14 +34,14 @@ regexp = Regexp.new( # rubocop:todo Layout/LineLength - "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time.to_formatted_s(:db)}.*", + "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time.to_fs(:db)}.*", # rubocop:enable Layout/LineLength Regexp::MULTILINE ) regexp2 = Regexp.new( # rubocop:todo Layout/LineLength - "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time2.to_formatted_s(:db)}.*", + "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time2.to_fs(:db)}.*", # rubocop:enable Layout/LineLength Regexp::MULTILINE ) @@ -73,14 +73,14 @@ regexp = Regexp.new( # rubocop:todo Layout/LineLength - "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time.to_formatted_s(:db)}.*", + "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time.to_fs(:db)}.*", # rubocop:enable Layout/LineLength Regexp::MULTILINE ) regexp2 = Regexp.new( # rubocop:todo Layout/LineLength - "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time2.to_formatted_s(:db)}.*", + "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time2.to_fs(:db)}.*", # rubocop:enable Layout/LineLength Regexp::MULTILINE ) diff --git a/spec/views/samples/show_html_erb_spec.rb b/spec/views/samples/show_html_erb_spec.rb index e89071b61f..a4e4420f3d 100644 --- a/spec/views/samples/show_html_erb_spec.rb +++ b/spec/views/samples/show_html_erb_spec.rb @@ -25,7 +25,7 @@ regexp = Regexp.new( # rubocop:todo Layout/LineLength - "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time.to_formatted_s(:db)}.*", + "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time.to_fs(:db)}.*", # rubocop:enable Layout/LineLength Regexp::MULTILINE ) @@ -48,7 +48,7 @@ regexp = Regexp.new( # rubocop:todo Layout/LineLength - "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time.to_formatted_s(:db)}.*", + "Patient consent has been withdrawn for this sample.*by user.*#{current_user.login}.*at .*#{time.to_fs(:db)}.*", # rubocop:enable Layout/LineLength Regexp::MULTILINE ) diff --git a/test/controllers/plate_summaries_controller_test.rb b/test/controllers/plate_summaries_controller_test.rb index 97602d9f71..4b7ef034e9 100644 --- a/test/controllers/plate_summaries_controller_test.rb +++ b/test/controllers/plate_summaries_controller_test.rb @@ -65,7 +65,7 @@ class PlateSummariesControllerTest < ActionController::TestCase get :search, params: { plate_barcode: 'abcd' } end - should redirect_to 'back' + should redirect_to('/') should set_flash.to 'No suitable plates found for barcode abcd' end