Sha256: 71b471ef49f3354a6e5513879d3ff412f3dccbfa594d40b49d4718ef75c40c83
Contents?: true
Size: 301 Bytes
Versions: 4
Compression:
Stored size: 301 Bytes
Contents
class CreateCategories < ActiveRecord::Migration def self.up create_table :categories do |t| t.string :name t.timestamps end add_column :posts, :category_id, :integer end def self.down remove_column :posts, :category_id drop_table :categories end end
Version data entries
4 entries across 4 versions & 1 rubygems