3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Add "Castrated" field to Animals (with migration).

This commit is contained in:
Michael Stenta 2020-10-07 14:38:47 -04:00
parent 8379dcef99
commit 53cc591d55
4 changed files with 43 additions and 0 deletions

View file

@ -219,6 +219,7 @@ fields are not listed here):
- `flags` -> `flag`
- `files` -> `file`
- `images` -> `image`
- `animal_castrated` -> `castrated`
- `animal_nicknames` -> `nickname`
- `animal_sex` -> `sex`

View file

@ -0,0 +1,22 @@
langcode: en
status: true
dependencies:
config:
- asset.type.animal
- field.storage.asset.castrated
id: asset.animal.castrated
field_name: castrated
entity_type: asset
bundle: animal
label: Castrated
description: 'Has this animal been castrated?'
required: false
translatable: false
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: 'Yes'
off_label: 'No'
field_type: boolean

View file

@ -0,0 +1,17 @@
langcode: en
status: true
dependencies:
module:
- asset
id: asset.castrated
field_name: castrated
entity_type: asset
type: boolean
settings: { }
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View file

@ -30,6 +30,9 @@ process:
sex:
plugin: get
source: field_farm_animal_sex
castrated:
plugin: get
source: field_farm_animal_castrated
migration_dependencies:
required:
- farm_migrate_asset