Class: CreateSubscribers

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/forge/db/migrate/20130405172040_create_subscribers.rb

Instance Method Summary collapse

Instance Method Details

#downObject



27
28
29
30
31
# File 'lib/forge/db/migrate/20130405172040_create_subscribers.rb', line 27

def down
  drop_table :subscribers
  drop_table :subscriber_groups
  drop_table :subscriber_group_members
end

#upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/forge/db/migrate/20130405172040_create_subscribers.rb', line 2

def up
  create_table "subscriber_group_members" do |t|
    t.integer  "subscriber_id"
    t.integer  "group_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "subscriber_group_members", ["group_id"], :name => "index_subscriber_group_members_on_group_id"
  add_index "subscriber_group_members", ["subscriber_id"], :name => "index_subscriber_group_members_on_subscriber_id"

  create_table "subscriber_groups" do |t|
    t.string   "title"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "subscribers" do |t|
    t.string   "name"
    t.string   "email"
    t.datetime "created_at"
    t.datetime "updated_at"
  end
end