class AddEntryDateAndTimeToQueryTool < ActiveRecord::DataMigration
  def up
    qf = QueryField.find_or_create_by(
        name: 'updated_at',
        label: 'Entry Date & Time',
        query_category: QueryCategory.find_or_create_by(name: 'Life Cycle (History Log)'),
        filter_type: 'date'
    )
    qf.query_asset_classes << QueryAssetClass.find_by(table_name: 'most_recent_asset_events')
  end
end
Move Entry Date & Time query tool field migration to core.
Move Entry Date & Time query tool field migration to core.
