Sha256: 0d79310d957f72cdcceaa14cd7d48bf1bde59547395bc7df3520dd6aaf43f05d
Contents?: true
Size: 837 Bytes
Versions: 5
Compression:
Stored size: 837 Bytes
Contents
class InitialTables < ActiveRecord::Migration def self.up create_table :companies do |t| t.string :name end create_table :projects do |t| t.references :owner, :polymorphic => true, :null => false t.string :name t.date :due_date end create_table :tasks do |t| t.references :project, :null => false t.string :name t.date :start_date t.date :end_date end create_table :milestones do |t| t.references :trackable, :polymorphic => true, :null => false t.string :name end create_table :project_tasks do |t| t.references :project, :null => false t.string :name end end def self.down drop_table :companies drop_table :projects drop_table :tasks drop_table :milestones drop_table :project_tasks end end
Version data entries
5 entries across 5 versions & 1 rubygems