Class: AddColorToProjects
- Inherits:
-
Object
- Object
- AddColorToProjects
- Defined in:
- lib/twenty-backend/migration/3_add_color_to_projects.rb
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
7 8 9 |
# File 'lib/twenty-backend/migration/3_add_color_to_projects.rb', line 7 def down drop_column :projects, :color end |
#up ⇒ Object
2 3 4 5 |
# File 'lib/twenty-backend/migration/3_add_color_to_projects.rb', line 2 def up default = Twenty::ColorableMixin.random_color add_column :projects, :color, :string, null: false, default: end |