ref: master
plugins/cms_learning/db/migrate/20111010183943_create_article_resources.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
class CreateArticleResources < ActiveRecord::Migration def self.up create_table :article_resources do |t| t.integer :article_id t.integer :resource_id t.string :resource_type t.timestamps end add_index :article_resources, :article_id add_index :article_resources, :resource_id add_index :article_resources, :resource_type end def self.down drop_table :article_resources end end |