Sha256: a18f7a9de4f3e832835e63a3d24b477115212b04393cedd361859cd9654e2227

Contents?: true

Size: 652 Bytes

Versions: 14

Compression:

Stored size: 652 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

14 entries across 14 versions & 1 rubygems

Version Path
dynflow-1.8.2 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.8.1 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.8.0 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.7.0 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.6.11 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.6.10 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.6.8 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.6.7 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.6.6 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.6.5 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.6.4 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.6.3 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.6.2 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
dynflow-1.6.1 lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb