Permalink
Browse files

Dropping the email addresses table when migrating down

  • Loading branch information...
1 parent f726db4 commit b74e2b3492a8785e69d77866f31cb4070c5ea154 @suttree suttree committed Dec 29, 2010
Showing with 6 additions and 5 deletions.
  1. +6 −5 lib/generators/omnisocial/templates/migration.rb
@@ -3,22 +3,22 @@ def self.up
create_table :users do |t|
t.string :remember_token
# Any additional fields here
-
+
t.timestamps
end
-
+
create_table :login_accounts do |t|
t.string :type
t.integer :user_id
t.string :remote_account_id
t.string :name
t.string :login
t.string :picture_url
- # Any additional fields here
+ # Any additional fields here
t.string :token
t.string :secret
t.text :user_hash
-
+
t.timestamps
end
create_table :email_addresses do |t|
@@ -27,7 +27,7 @@ def self.up
t.timestamps
end
-
+
add_index :login_accounts, :user_id
add_index :login_accounts, :type
add_index :login_accounts, [:type, :remote_account_id], :name => 'type_remote_acc_id'
@@ -37,6 +37,7 @@ def self.down
remove_index :login_accounts, :name => 'type_remote_acc_id'
remove_index :login_accounts, :type
remove_index :login_accounts, :user_id
+ drop_table :email_addresses
drop_table :login_accounts
drop_table :users
end

0 comments on commit b74e2b3

Please sign in to comment.