Drop unused body columns

This commit is contained in:
Jeffrey Hardy
2024-09-19 10:11:30 -04:00
parent b53054bdb0
commit 8a0a541d5c
6 changed files with 23 additions and 28 deletions
+1 -1
View File
@@ -41,6 +41,6 @@ class BubblesController < ApplicationController
end
def bubble_params
params.require(:bubble).permit(:title, :body, :color, :due_on, :image, tag_ids: [])
params.require(:bubble).permit(:title, :color, :due_on, :image, tag_ids: [])
end
end
@@ -0,0 +1,5 @@
class RemoveBodyFromBubbles < ActiveRecord::Migration[8.0]
def change
remove_column :bubbles, :body, :string
end
end
@@ -0,0 +1,5 @@
class RemoveBodyFromBoosts < ActiveRecord::Migration[8.0]
def change
remove_column :boosts, :body, :string
end
end
Generated
+1 -3
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2024_09_17_174301) do
ActiveRecord::Schema[8.0].define(version: 2024_09_19_141018) do
create_table "accesses", force: :cascade do |t|
t.integer "project_id", null: false
t.integer "user_id", null: false
@@ -66,7 +66,6 @@ ActiveRecord::Schema[8.0].define(version: 2024_09_17_174301) do
end
create_table "boosts", force: :cascade do |t|
t.string "body"
t.integer "creator_id", null: false
t.integer "bubble_id", null: false
t.datetime "created_at", null: false
@@ -76,7 +75,6 @@ ActiveRecord::Schema[8.0].define(version: 2024_09_17_174301) do
create_table "bubbles", force: :cascade do |t|
t.string "title"
t.text "body"
t.string "color"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+9 -19
View File
@@ -1,25 +1,15 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
body: ""
creator: jz
logo_one:
bubble: logo
created_at: <%= 3.seconds.from_now %>
two:
body: ""
creator: jz
bubble: layout
created_at: <%= 3.seconds.from_now %>
three:
body: ""
logo_two:
bubble: logo
creator: jz
logo_three:
bubble: logo
creator: kevin
bubble: logo
created_at: <%= 3.seconds.from_now %>
four:
body: ""
layout_one:
bubble: layout
creator: jz
bubble: logo
created_at: <%= 3.seconds.from_now %>
+2 -5
View File
@@ -2,20 +2,17 @@ logo:
project: writebook
creator: david
title: The logo isn't big enough
body: Make the logo bigger.
color: '#ED8008'
color: "#ED8008"
due_on: <%= 3.days.from_now %>
layout:
project: writebook
creator: david
title: Layout is broken
body: The page scrolls horizontally on mobile devices.
color: '#698F9C'
color: "#698F9C"
text:
project: writebook
creator: kevin
title: The text is too small
body: Increase the font size.
color: "#3B4B59"