diff --git a/db/migrate/20190324172539_remove_unnecessary_telegram_stuff.rb b/db/migrate/20190324172539_remove_unnecessary_telegram_stuff.rb new file mode 100644 index 0000000..4166c39 --- /dev/null +++ b/db/migrate/20190324172539_remove_unnecessary_telegram_stuff.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class RemoveUnnecessaryTelegramStuff < ActiveRecord::Migration[6.0] + def change + # rubocop:disable Rails/ReversibleMigration + drop_table :account_telegram_contacts + drop_table :telegram_bots + drop_table :telegram_chats + # rubocop:enable Rails/ReversibleMigration + end +end diff --git a/db/schema.rb b/db/schema.rb index c00cde0..70b7750 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2019_02_08_062215) do +ActiveRecord::Schema.define(version: 2019_03_24_172539) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -27,15 +27,6 @@ ActiveRecord::Schema.define(version: 2019_02_08_062215) do t.index ["role_id"], name: "index_account_roles_on_role_id" end - create_table "account_telegram_contacts", force: :cascade do |t| - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.bigint "account_id", null: false - t.bigint "telegram_chat_id", null: false - t.index ["account_id"], name: "index_account_telegram_contacts_on_account_id" - t.index ["telegram_chat_id"], name: "index_account_telegram_contacts_on_telegram_chat_id", unique: true - end - create_table "accounts", force: :cascade do |t| t.datetime "created_at", null: false t.datetime "updated_at", null: false @@ -157,26 +148,6 @@ ActiveRecord::Schema.define(version: 2019_02_08_062215) do t.index ["resource_type", "resource_id"], name: "index_roles_on_resource_type_and_resource_id" end - create_table "telegram_bots", force: :cascade do |t| - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "secret", null: false - t.string "api_token", null: false - t.string "username" - end - - create_table "telegram_chats", force: :cascade do |t| - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "remote_id", null: false - t.string "chat_type", null: false - t.string "title" - t.string "username" - t.string "first_name" - t.string "last_name" - t.index ["remote_id"], name: "index_telegram_chats_on_remote_id", unique: true - end - create_table "user_omniauths", force: :cascade do |t| t.datetime "created_at", null: false t.datetime "updated_at", null: false @@ -218,8 +189,6 @@ ActiveRecord::Schema.define(version: 2019_02_08_062215) do add_foreign_key "account_roles", "accounts" add_foreign_key "account_roles", "roles" - add_foreign_key "account_telegram_contacts", "accounts" - add_foreign_key "account_telegram_contacts", "telegram_chats" add_foreign_key "accounts", "people" add_foreign_key "membership_apps", "accounts" add_foreign_key "membership_apps", "country_states"