Class: CreateUploads
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateUploads
- Defined in:
- lib/generators/attachs/upload/templates/migration.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/generators/attachs/upload/templates/migration.rb', line 2 def change create_table :uploads do |t| t.jsonb :file, default: {} t.string :record_type t.string :record_attribute t. null: false end end |