Class: DropAttachments
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- DropAttachments
- Defined in:
- db/migrate/20130619162051_drop_attachments.rb
Overview
Drops obsolete attachments table.
Constant Summary collapse
- TABLE_NAME =
Table name
:attachments
Instance Method Summary collapse
-
#down ⇒ void
Recreates attachments, but without data.
-
#up ⇒ void
Drops attachments.
Instance Method Details
#down ⇒ void
This method returns an undefined value.
Recreates attachments, but without data.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'db/migrate/20130619162051_drop_attachments.rb', line 14 def down create_table TABLE_NAME do |t| # # Columns # t.binary :data t.string :content_type, :limit => 512 t.boolean :inline, :default => true, :null => false t.string :name, :limit => 512 t.boolean :zip, :default => false, :null => false # # Foreign Keys # t.references :campaign end end |
#up ⇒ void
This method returns an undefined value.
Drops attachments
43 44 45 |
# File 'db/migrate/20130619162051_drop_attachments.rb', line 43 def up drop_table TABLE_NAME end |