✂️✂️✂️ Part 3: Remove Sponsorship Table (#18529)
* feat: remove initializeSponsorshipVisibility and related code * feat: remove sponsorships from sidebar * feat: remove sponsorships from the admin - route, controller, view, spec * feat: remove the admin menu item * feat: remove the i8n for admin sponsors controller * feat: sponsorship decorator was not being used anywhere * feat: sponsorship slack messenger was not being used anywhere * feat: remove the sponsorship_headline that gets configures on the admin * feat: remove the /sponsors page * feat: remove renedring of single_sponsor partial and associated partials * feat: remove the navigation link rake task for sponsors * feat: remove sponsorship from tags * feat: remove i8n constants used * remove sponsor references in text to the privacy page * feat: remove the sponsorship detail from the organization page * feat: remove the sponsors css that was used for app/views/pages/sponsors.html.erb * feat: remove the sponsorship i8n that was used in the slack messengers * feat: swap out the decorators to use Article as an example * feat: remove spec to show sponsors on home page * feat: update the specs to use Article Decorator instead of the Sponsorship Decorator * fix: use direct and not all * fix: remove tests for tag sponsorship * fix: remove organization sponsorship test * feat: remove more i8n * remove unused css from app/views/organizations/_sidebar_additional.html.erb * feat: remove sponsorship relationship from tag and organization * remove seed * feat: remove all Sponsor related specs * feat: remove model, associated i8n and specs * feat: remove sponsor from navbar * feat: add a guard clause if we're unable to constantinize the purchase_type * feat; remove sponsorship related tests * feat: remove sponsorship relationship * feat: remov especs related to sponsorship * feat: remove tag sponsorship validation * feat: remove the sponsorship factory * feat: drop the sponsorships table
This commit is contained in:
parent
f70bc2b0b8
commit
29421d8fbb
2 changed files with 16 additions and 26 deletions
15
db/migrate/20221003103855_drop_sponsorship_table.rb
Normal file
15
db/migrate/20221003103855_drop_sponsorship_table.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
class DropSponsorshipTable < ActiveRecord::Migration[7.0]
|
||||
def up
|
||||
safety_assured do
|
||||
remove_foreign_key :sponsorships, :organizations
|
||||
remove_foreign_key :sponsorships, :users
|
||||
|
||||
drop_table :sponsorships
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigratione
|
||||
end
|
||||
end
|
||||
|
||||
27
db/schema.rb
27
db/schema.rb
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2022_09_28_162321) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2022_10_03_103855) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "citext"
|
||||
enable_extension "pg_stat_statements"
|
||||
|
|
@ -1051,29 +1051,6 @@ ActiveRecord::Schema[7.0].define(version: 2022_09_28_162321) do
|
|||
t.index ["var"], name: "index_site_configs_on_var", unique: true
|
||||
end
|
||||
|
||||
create_table "sponsorships", force: :cascade do |t|
|
||||
t.text "blurb_html"
|
||||
t.datetime "created_at", precision: nil, null: false
|
||||
t.datetime "expires_at", precision: nil
|
||||
t.integer "featured_number", default: 0, null: false
|
||||
t.text "instructions"
|
||||
t.datetime "instructions_updated_at", precision: nil
|
||||
t.string "level", null: false
|
||||
t.bigint "organization_id"
|
||||
t.bigint "sponsorable_id"
|
||||
t.string "sponsorable_type"
|
||||
t.string "status", default: "none", null: false
|
||||
t.string "tagline"
|
||||
t.datetime "updated_at", precision: nil, null: false
|
||||
t.string "url"
|
||||
t.bigint "user_id"
|
||||
t.index ["level"], name: "index_sponsorships_on_level"
|
||||
t.index ["organization_id"], name: "index_sponsorships_on_organization_id"
|
||||
t.index ["sponsorable_id", "sponsorable_type"], name: "index_sponsorships_on_sponsorable_id_and_sponsorable_type"
|
||||
t.index ["status"], name: "index_sponsorships_on_status"
|
||||
t.index ["user_id"], name: "index_sponsorships_on_user_id"
|
||||
end
|
||||
|
||||
create_table "tag_adjustments", force: :cascade do |t|
|
||||
t.string "adjustment_type"
|
||||
t.bigint "article_id"
|
||||
|
|
@ -1437,8 +1414,6 @@ ActiveRecord::Schema[7.0].define(version: 2022_09_28_162321) do
|
|||
add_foreign_key "rating_votes", "users", on_delete: :nullify
|
||||
add_foreign_key "reactions", "users", on_delete: :cascade
|
||||
add_foreign_key "response_templates", "users"
|
||||
add_foreign_key "sponsorships", "organizations"
|
||||
add_foreign_key "sponsorships", "users"
|
||||
add_foreign_key "tag_adjustments", "articles", on_delete: :cascade
|
||||
add_foreign_key "tag_adjustments", "tags", on_delete: :cascade
|
||||
add_foreign_key "tag_adjustments", "users", on_delete: :cascade
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue