feat: Added Instagram channel migration (#11181)

This PR is part of https://github.com/chatwoot/chatwoot/pull/11054 to
make the review cycle easier.
This commit is contained in:
Muhsin Keloth
2025-03-26 11:12:32 +05:30
committed by GitHub
parent 157ec00994
commit d9450fde4a
6 changed files with 83 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
class AddInstagramChannel < ActiveRecord::Migration[7.0]
def change
create_table :channel_instagram do |t|
t.string :access_token, null: false
t.datetime :expires_at, null: false
t.integer :account_id, null: false
t.string :instagram_id, null: false
t.timestamps
end
add_index :channel_instagram, :instagram_id, unique: true
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2025_03_15_202035) do
ActiveRecord::Schema[7.0].define(version: 2025_03_26_034635) do
# These extensions should be enabled to support this database
enable_extension "pg_stat_statements"
enable_extension "pg_trgm"
@@ -377,6 +377,16 @@ ActiveRecord::Schema[7.0].define(version: 2025_03_15_202035) do
t.index ["page_id"], name: "index_channel_facebook_pages_on_page_id"
end
create_table "channel_instagram", force: :cascade do |t|
t.string "access_token", null: false
t.datetime "expires_at", null: false
t.integer "account_id", null: false
t.string "instagram_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["instagram_id"], name: "index_channel_instagram_on_instagram_id", unique: true
end
create_table "channel_line", force: :cascade do |t|
t.integer "account_id", null: false
t.string "line_channel_id", null: false