Browse Source

Refactoring: Remove unused table 'chat_topics'.

Thorsten Eckel 3 years ago
parent
commit
5e4084d908

+ 0 - 13
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

+ 0 - 3
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 }],