Sha256: a85374b6a312ebc10c45c872536b713db24a6147172df8b0846053f6bcad9a1e

Contents?: true

Size: 653 Bytes

Versions: 2

Compression:

Stored size: 653 Bytes

Contents

# frozen_string_literal: true

tables = [:dynflow_actions, :dynflow_delayed_plans, :dynflow_steps, :dynflow_output_chunks]
Sequel.migration do
  up do
    if database_type == :sqlite && Gem::Version.new(SQLite3::SQLITE_VERSION) <= Gem::Version.new('3.7.17')
      tables.each do |table|
        alter_table(table) { drop_foreign_key [:execution_plan_uuid] }
      end
    end
  end

  down do
    if database_type == :sqlite && Gem::Version.new(SQLite3::SQLITE_VERSION) <= Gem::Version.new('3.7.17')
      tables.each do |table|
        alter_table(table) { add_foreign_key [:execution_plan_uuid], :dynflow_execution_plans }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dynflow-1.9.0 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.8.3 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb