Sha256: 1973c69551464e9d7447522383281251aa5dd19be048206b3ec4b51d266c89e9

Contents?: true

Size: 526 Bytes

Versions: 17

Compression:

Stored size: 526 Bytes

Contents

class CreateHistoricalHeads < ActiveRecord::Migration
  def up
    create_table :historical_heads do |t|
      t.integer :project_id, null: false
      t.hstore :branches, null: false, default: {}

      t.timestamps
    end

    Project.unretired.with_version_control.each do |project|
      puts "Checking #{project.slug}"
      project.repo.refresh!

      HistoricalHead.create!(
        project_id: project.id,
        branches: project.repo.branches)
    end
  end

  def down
    drop_table :historical_heads
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
houston-core-0.8.0.pre db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.7.0 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.7.0.beta4 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.7.0.beta3 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.7.0.beta2 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.7.0.beta db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.6.3 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.6.2 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.6.1 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.6.0 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.5.6 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.5.5 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.5.4 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.5.3 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.5.2 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.5.1 db/migrate/20140929004347_create_historical_heads.rb
houston-core-0.5.0 db/migrate/20140929004347_create_historical_heads.rb