Remove acts_as_taggable_on gem #82
1
Gemfile
1
Gemfile
@ -1,7 +1,6 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
ruby '3.3.5'
|
||||
gem 'acts-as-taggable-on'
|
||||
gem 'bootsnap', require: false
|
||||
gem 'csv'
|
||||
gem 'importmap-rails'
|
||||
|
@ -72,9 +72,6 @@ GEM
|
||||
minitest (>= 5.1)
|
||||
securerandom (>= 0.3)
|
||||
tzinfo (~> 2.0, >= 2.0.5)
|
||||
acts-as-taggable-on (11.0.0)
|
||||
activerecord (>= 7.0, < 8.0)
|
||||
zeitwerk (>= 2.4, < 3.0)
|
||||
ast (2.4.2)
|
||||
babel-source (5.8.35)
|
||||
babel-transpiler (0.7.0)
|
||||
@ -315,7 +312,6 @@ PLATFORMS
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
acts-as-taggable-on
|
||||
bootsnap
|
||||
csv
|
||||
debug
|
||||
|
@ -1,7 +1,6 @@
|
||||
# Copyright (C) 2024 Manuel Bustillo
|
||||
|
||||
class Guest < ApplicationRecord
|
||||
acts_as_taggable_on :affinity_groups, :unbreakable_bonds
|
||||
belongs_to :group
|
||||
|
||||
enum status: {
|
||||
|
37
db/migrate/20241101181052_drop_taggable_tables.rb
Normal file
37
db/migrate/20241101181052_drop_taggable_tables.rb
Normal file
@ -0,0 +1,37 @@
|
||||
# Copyright (C) 2024 Manuel Bustillo
|
||||
|
||||
class DropTaggableTables < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
drop_table 'taggings', force: :cascade do |t|
|
||||
t.bigint 'tag_id'
|
||||
t.string 'taggable_type'
|
||||
t.uuid 'taggable_id'
|
||||
t.string 'tagger_type'
|
||||
t.bigint 'tagger_id'
|
||||
t.string 'context', limit: 128
|
||||
t.datetime 'created_at', precision: nil
|
||||
t.string 'tenant', limit: 128
|
||||
t.index ['context'], name: 'index_taggings_on_context'
|
||||
t.index %w[tag_id taggable_id taggable_type context tagger_id tagger_type], name: 'taggings_idx',
|
||||
unique: true
|
||||
t.index ['tag_id'], name: 'index_taggings_on_tag_id'
|
||||
t.index %w[taggable_id taggable_type context], name: 'taggings_taggable_context_idx'
|
||||
t.index %w[taggable_id taggable_type tagger_id context], name: 'taggings_idy'
|
||||
t.index ['taggable_id'], name: 'index_taggings_on_taggable_id'
|
||||
t.index %w[taggable_type taggable_id], name: 'index_taggings_on_taggable_type_and_taggable_id'
|
||||
t.index ['taggable_type'], name: 'index_taggings_on_taggable_type'
|
||||
t.index %w[tagger_id tagger_type], name: 'index_taggings_on_tagger_id_and_tagger_type'
|
||||
t.index ['tagger_id'], name: 'index_taggings_on_tagger_id'
|
||||
t.index %w[tagger_type tagger_id], name: 'index_taggings_on_tagger_type_and_tagger_id'
|
||||
t.index ['tenant'], name: 'index_taggings_on_tenant'
|
||||
end
|
||||
|
||||
drop_table "tags", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "taggings_count", default: 0
|
||||
t.index ["name"], name: "index_tags_on_name", unique: true
|
||||
end
|
||||
end
|
||||
end
|
34
db/schema.rb
generated
34
db/schema.rb
generated
@ -12,7 +12,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.1].define(version: 2024_08_11_170021) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2024_11_01_181052) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
@ -67,40 +67,8 @@ ActiveRecord::Schema[7.1].define(version: 2024_08_11_170021) do
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "taggings", force: :cascade do |t|
|
||||
t.bigint "tag_id"
|
||||
t.string "taggable_type"
|
||||
t.uuid "taggable_id"
|
||||
t.string "tagger_type"
|
||||
t.bigint "tagger_id"
|
||||
t.string "context", limit: 128
|
||||
t.datetime "created_at", precision: nil
|
||||
t.string "tenant", limit: 128
|
||||
t.index ["context"], name: "index_taggings_on_context"
|
||||
t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
|
||||
t.index ["tag_id"], name: "index_taggings_on_tag_id"
|
||||
t.index ["taggable_id", "taggable_type", "context"], name: "taggings_taggable_context_idx"
|
||||
t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy"
|
||||
t.index ["taggable_id"], name: "index_taggings_on_taggable_id"
|
||||
t.index ["taggable_type", "taggable_id"], name: "index_taggings_on_taggable_type_and_taggable_id"
|
||||
t.index ["taggable_type"], name: "index_taggings_on_taggable_type"
|
||||
t.index ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type"
|
||||
t.index ["tagger_id"], name: "index_taggings_on_tagger_id"
|
||||
t.index ["tagger_type", "tagger_id"], name: "index_taggings_on_tagger_type_and_tagger_id"
|
||||
t.index ["tenant"], name: "index_taggings_on_tenant"
|
||||
end
|
||||
|
||||
create_table "tags", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "taggings_count", default: 0
|
||||
t.index ["name"], name: "index_tags_on_name", unique: true
|
||||
end
|
||||
|
||||
add_foreign_key "groups", "groups", column: "parent_id"
|
||||
add_foreign_key "guests", "groups"
|
||||
add_foreign_key "seats", "guests"
|
||||
add_foreign_key "seats", "tables_arrangements", on_delete: :cascade
|
||||
add_foreign_key "taggings", "tags"
|
||||
end
|
||||
|
@ -5,8 +5,6 @@ NUMBER_OF_GUESTS = 50
|
||||
TablesArrangement.delete_all
|
||||
Expense.delete_all
|
||||
Guest.delete_all
|
||||
ActsAsTaggableOn::Tagging.delete_all
|
||||
ActsAsTaggableOn::Tag.delete_all
|
||||
Group.delete_all
|
||||
|
||||
Expense.create!(name: 'Photographer', amount: 3000, pricing_type: 'fixed')
|
||||
|
Loading…
x
Reference in New Issue
Block a user