Skip to content

Commit

Permalink
Removing unnecessary images on the database
Browse files Browse the repository at this point in the history
  • Loading branch information
ger619 committed May 6, 2024
1 parent 7ca51b3 commit b7ed64f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
2 changes: 0 additions & 2 deletions app/models/advert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
# Table name: adverts
#
# id :uuid not null, primary key
# desk_image :string
# header_advert :string
# mobile_image :string
# type_of_advert :string
# created_at :datetime not null
# updated_at :datetime not null
Expand Down
6 changes: 6 additions & 0 deletions db/migrate/20240506154255_create_remove_image_from_adverts.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class CreateRemoveImageFromAdverts < ActiveRecord::Migration[7.0]
def change
remove_column :adverts, :mobile_image, :string
remove_column :adverts, :desk_image, :string
end
end
4 changes: 1 addition & 3 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions test/fixtures/adverts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
# Table name: adverts
#
# id :uuid not null, primary key
# desk_image :string
# header_advert :string
# mobile_image :string
# type_of_advert :string
# created_at :datetime not null
# updated_at :datetime not null
Expand Down
11 changes: 11 additions & 0 deletions test/fixtures/remove_image_from_adverts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html

# This model initially had no columns defined. If you add columns to the
# model remove the "{}" from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value
2 changes: 0 additions & 2 deletions test/models/advert_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
# Table name: adverts
#
# id :uuid not null, primary key
# desk_image :string
# header_advert :string
# mobile_image :string
# type_of_advert :string
# created_at :datetime not null
# updated_at :datetime not null
Expand Down
7 changes: 0 additions & 7 deletions test/models/remove_image_from_news_test.rb

This file was deleted.

0 comments on commit b7ed64f

Please sign in to comment.