Class: CreateHtmlColors
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateHtmlColors
- Defined in:
- lib/generators/active_seed/templates/example_html_colors/create_html_colors.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
18 19 20 21 |
# File 'lib/generators/active_seed/templates/example_html_colors/create_html_colors.rb', line 18 def self.down drop_table :html_colors drop_table :html_color_families end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/generators/active_seed/templates/example_html_colors/create_html_colors.rb', line 2 def self.up create_table :html_color_families do |t| t.string :name t. end create_table :html_colors do |t| t.string :name t.string :hex_code t.references :html_color_family t. end end |