From 5e4084d9084b7ef206cd0c454e1cbe160070d1e2 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Mon, 12 Apr 2021 10:46:07 +0200 Subject: [PATCH] Refactoring: Remove unused table 'chat_topics'. --- db/migrate/20120101000010_create_ticket.rb | 13 ------------- db/migrate/20170531144425_foreign_keys.rb | 3 --- 2 files changed, 16 deletions(-) diff --git a/db/migrate/20120101000010_create_ticket.rb b/db/migrate/20120101000010_create_ticket.rb index 0eaafe58c..b01a96766 100644 --- a/db/migrate/20120101000010_create_ticket.rb +++ b/db/migrate/20120101000010_create_ticket.rb @@ -489,18 +489,6 @@ class CreateTicket < ActiveRecord::Migration[4.2] add_foreign_key :chats, :users, column: :created_by_id add_foreign_key :chats, :users, column: :updated_by_id - create_table :chat_topics do |t| - t.integer :chat_id, null: false - t.string :name, limit: 250, null: false - t.string :note, limit: 250, null: true - t.integer :updated_by_id, null: false - t.integer :created_by_id, null: false - t.timestamps limit: 3, null: false - end - add_index :chat_topics, [:name], unique: true - add_foreign_key :chat_topics, :users, column: :created_by_id - add_foreign_key :chat_topics, :users, column: :updated_by_id - create_table :chat_sessions do |t| t.references :chat, null: false t.string :session_id, null: false @@ -608,7 +596,6 @@ class CreateTicket < ActiveRecord::Migration[4.2] drop_table :karma_activities drop_table :karma_users drop_table :report_profiles - drop_table :chat_topics drop_table :chat_sessions drop_table :chat_messages drop_table :chat_agents diff --git a/db/migrate/20170531144425_foreign_keys.rb b/db/migrate/20170531144425_foreign_keys.rb index d42d9df1a..e0430ca65 100644 --- a/db/migrate/20170531144425_foreign_keys.rb +++ b/db/migrate/20170531144425_foreign_keys.rb @@ -197,9 +197,6 @@ class ForeignKeys < ActiveRecord::Migration[4.2] [:chats, :users, { column: :created_by_id }], [:chats, :users, { column: :updated_by_id }], - [:chat_topics, :users, { column: :created_by_id }], - [:chat_topics, :users, { column: :updated_by_id }], - %i[chat_sessions chats], %i[chat_sessions users], [:chat_sessions, :users, { column: :created_by_id }],