Created
August 4, 2020 23:51
-
-
Save jasmo2/6e664166e3d9f18c133c67d0ee1684c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alter table(:qa_job) do | |
add :body, :jsonb | |
add :input, :jsonb | |
add :output, :jsonb | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
schema "qa_job" do | |
belongs_to :media, Media | |
field :priority, :integer, default: 10 | |
field :status, Types.JobStatusType | |
embeds_one :input, QAJob.Input | |
embeds_one :body, QAJob.Body | |
embeds_one :output, QAJob.Output, on_replace: :update | |
timestamps type: :utc_datetime_usec | |
end | |
defmodule QAJob.Input do | |
embedded_schema do | |
field :meta, AtomJson | |
field :pivot_media_url, :string | |
field :inspections, {:array, AtomJson} | |
field :accumulated_feature_flags | |
end | |
end | |
defmodule QAJob.Body do | |
embedded_schema do | |
field :pivot_media_url, :string | |
embeds_many :inspections, Inspection | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment