8000 "attributes": New generic table for misc. information polymorphic relations · Issue #505 · PecanProject/bety · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
"attributes": New generic table for misc. information polymorphic relations  #505
Closed
@dlebauer

Description

@dlebauer

Table name: miscelaneyiis please propose ...

Use cases:

  • adding synonyms to variables
  • adding additional metadata to cultivars (e.g. lineage, etc)
  • PEcAn, add all parameters that we currently store in xml
  • generally whereever we have notes that we use to store additional info
  • (eventually) could deprecate many fields that are sparsely populated

Implementation (Option 3)

Fields

  • type: table name
  • type_id: id in table name
  • value: json

unique type, type_id

Plus standard ruby stuff

  • id: bigint
  • updated_at
  • created_at

Other options originally considered

Option 1
Four fields:

  • type: table name (key unique)
  • type_id: id in table name
  • key: character
  • value: charcater

unique type, type_id, key

Option 2

  • type: table name
  • type_id: id in table name
  • key: character
  • value_string:
  • value_float:
  • value_int:
  • ...

unique type, type_id, key

Option 2.1

  • type: table name
  • type_id: id in table name
  • key: character
  • type: (char) data type
  • value: (char)

Option 3

  • type: table name
  • type_id: id in table name
  • value: json

unique type, type_id

Plus standard ruby stuff

  • id: bigint
  • updated_at
  • created_at

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0