Method: Webhookdb::Replicator::TransistorEpisodeV1#_denormalized_columns

Defined in:
lib/webhookdb/replicator/transistor_episode_v1.rb

#_denormalized_columnsObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/webhookdb/replicator/transistor_episode_v1.rb', line 23

def _denormalized_columns
  return [
    Webhookdb::Replicator::Column.new(:author, TEXT, data_key: ["attributes", "author"]),
    Webhookdb::Replicator::Column.new(
      :created_at,
      TIMESTAMP,
      index: true,
      data_key: ["attributes", "created_at"],
    ),
    Webhookdb::Replicator::Column.new(:duration, INTEGER, data_key: ["attributes", "duration"]),
    Webhookdb::Replicator::Column.new(:keywords, TEXT, data_key: ["attributes", "keywords"]),
    Webhookdb::Replicator::Column.new(:number, INTEGER, index: true, data_key: ["attributes", "number"]),
    Webhookdb::Replicator::Column.new(
      :published_at,
      TIMESTAMP,
      index: true,
      data_key: ["attributes", "published_at"],
    ),
    Webhookdb::Replicator::Column.new(:season, INTEGER, index: true, data_key: ["attributes", "season"]),
    Webhookdb::Replicator::Column.new(
      :show_id,
      TEXT,
      index: true,
      data_key: ["relationships", "show", "data", "id"],
    ),
    Webhookdb::Replicator::Column.new(:status, TEXT, data_key: ["attributes", "status"]),
    Webhookdb::Replicator::Column.new(:title, TEXT, data_key: ["attributes", "title"]),
    Webhookdb::Replicator::Column.new(:type, TEXT, data_key: ["attributes", "type"]),
    Webhookdb::Replicator::Column.new(
      :updated_at,
      TIMESTAMP,
      index: true,
      data_key: ["attributes", "updated_at"],
    ),

    Webhookdb::Replicator::Column.new(:transcript_text, TEXT, optional: true),

    # Ideally these would have converters, but they'd be very confusing, and when this was built
    # we only had one transistor user, so we truncated the table instead.
    Webhookdb::Replicator::Column.new(:api_format, INTEGER, optional: true),
    Webhookdb::Replicator::Column.new(:logical_summary, TEXT, optional: true),
    Webhookdb::Replicator::Column.new(:logical_description, TEXT, optional: true),
  ]
end