Sha256: 31781d3cb9c0674baddaeada90e0a5a178c21ffa6f6ce62d955fe7a74456573d
Contents?: true
Size: 560 Bytes
Versions: 7
Compression:
Stored size: 560 Bytes
Contents
class SunriseCreatePosts < ActiveRecord::Migration def self.up create_table :posts do |t| t.integer :structure_id t.string :title, :null => false # t.string :slug, :limit=>40, :null=>false t.text :content t.integer :kind, :limit => 1, :default => 0 t.integer :comments_count, :default=>0 t.integer :year, :limit => 4 t.datetime :published_at t.timestamps end add_index :posts, :structure_id add_index :posts, :year end def self.down drop_table :posts end end
Version data entries
7 entries across 6 versions & 1 rubygems