Sha256: 470e441322232f54cdb406b2b992ea4907eceed63649d637dee15bf984f77529

Contents?: true

Size: 1.3 KB

Versions: 6

Compression:

Stored size: 1.3 KB

Contents

# encoding: UTF-8

SuperClass = ActiveRecord::VERSION::MAJOR >= 5 && ActiveRecord::VERSION::MINOR >= 1 ? ActiveRecord::Migration[5.1] : ActiveRecord::Migration

class CreatePostsTable < SuperClass
  def change
    create_table :posts do |t|
      t.column :title, :string
    end
  end
end

class CreateCommentsTable < SuperClass
  def change
    create_table :comments do |t|
      t.references :post
    end
  end
end

class CreateAuthorsTable < SuperClass
  def change
    create_table :authors do |t|
      t.references :comment
      t.references :collab_posts
    end
  end
end

class CreateFavoritesTable < SuperClass
  def change
    create_table :favorites do |t|
      t.references :post
    end
  end
end

class CreateCollabPostsTable < SuperClass
  def change
    create_table :collab_posts do |t|
      t.references :authors
    end
  end
end

class CreateCardsTable < SuperClass
  def change
    create_table :cards
  end
end

class CreateCardLocationsTable < SuperClass
  def change
    create_table :card_locations do |t|
      t.references :location
      t.references :card, polymorphic: true
    end
  end
end

class CreateLocationsTable < SuperClass
  def change
    create_table :locations
  end
end

class CreateCommunityTicketsTable < SuperClass
  def change
    create_table :community_tickets
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arel-helpers-2.8.0 spec/env/migrations.rb
arel-helpers-2.7.0 spec/env/migrations.rb
arel-helpers-2.6.1 spec/env/migrations.rb
arel-helpers-2.6.0 spec/env/migrations.rb
arel-helpers-2.5.0 spec/env/migrations.rb
arel-helpers-2.4.0 spec/env/migrations.rb