1
0
Fork 0

Remove unnecessary Telegram tables

This commit is contained in:
Alex Kotov 2019-03-24 22:27:18 +05:00
parent f21c053da6
commit 4512082343
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 12 additions and 32 deletions

View file

@ -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

View file

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # 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 # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" 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" t.index ["role_id"], name: "index_account_roles_on_role_id"
end 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| create_table "accounts", force: :cascade do |t|
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_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" t.index ["resource_type", "resource_id"], name: "index_roles_on_resource_type_and_resource_id"
end 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| create_table "user_omniauths", force: :cascade do |t|
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_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", "accounts"
add_foreign_key "account_roles", "roles" 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 "accounts", "people"
add_foreign_key "membership_apps", "accounts" add_foreign_key "membership_apps", "accounts"
add_foreign_key "membership_apps", "country_states" add_foreign_key "membership_apps", "country_states"