Sha256: 324013996b6f4eeb2310545839fc3437c24eb6aa77de0cbfda0160a7f14940b9

Contents?: true

Size: 930 Bytes

Versions: 2

Compression:

Stored size: 930 Bytes

Contents

# frozen_string_literal: true

Sequel.migration do
  up do
    type = database_type
    create_table(:dynflow_output_chunks) do
      primary_key :id

      column_properties = if type.to_s.include?('postgres')
                            { type: :uuid }
                          else
                            { type: String, size: 36, fixed: true, null: false }
                          end
      foreign_key :execution_plan_uuid, :dynflow_execution_plans, **column_properties
      index :execution_plan_uuid

      column :action_id, Integer, null: false
      foreign_key [:execution_plan_uuid, :action_id], :dynflow_actions,
        name: :dynflow_output_chunks_execution_plan_uuid_fkey1
      index [:execution_plan_uuid, :action_id]

      column :chunk, String, text: true
      column :kind, String
      column :timestamp, Time, null: false
    end
  end

  down do
    drop_table(:dynflow_output_chunks)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dynflow-1.9.0 lib/dynflow/persistence_adapters/sequel_migrations/021_create_output_chunks.rb
dynflow-1.8.3 lib/dynflow/persistence_adapters/sequel_migrations/021_create_output_chunks.rb