instagram_connect 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/db/migrate/20260715072548_create_instagram_connect_accounts.rb +2 -2
- data/db/migrate/20260715072549_create_instagram_connect_conversations.rb +2 -2
- data/db/migrate/20260715072550_create_instagram_connect_messages.rb +3 -3
- data/db/migrate/20260715072551_create_instagram_connect_inbound_messages.rb +2 -2
- data/db/migrate/20260715072552_create_instagram_connect_comments.rb +3 -3
- data/lib/instagram_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f4a972be2b5c0175979544a4dd6ab82761eecf99faff16d21963d6fb68bb0bec
|
|
4
|
+
data.tar.gz: 82f6f5976f01138384fff03c903c28568f92f05cd70c7de3aade20770d17b703
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b087039e17767925830b1e00d612c816fc483556f02b11adc6c9255a43f23d06da38ce1187b7c5d4cb45bc95f56484ebe6d82f5df91f55ebaf8c41b02b79c105
|
|
7
|
+
data.tar.gz: a00bef3ef4765da3a81097965c1852775ae6b3f18405564309dc52981e4ed94b9f96fd9291809c0d139dda4416c624c95af9908e2debd7b531eeb09f6700bfc9
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes to this project are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/) and the project adheres to
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.2.1]
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- Migrations are now idempotent (`create_table` / `add_index` with `if_not_exists: true`),
|
|
11
|
+
so `db:migrate` / `db:prepare` succeeds on a database that already has the tables —
|
|
12
|
+
e.g. an existing deploy, or one set up via `db:schema:load`. Previously a redeploy
|
|
13
|
+
could fail with `PG::DuplicateTable`.
|
|
14
|
+
|
|
7
15
|
## [0.2.0]
|
|
8
16
|
|
|
9
17
|
True plug-and-play: the gem now owns the data model and the UI, so a host adds
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class CreateInstagramConnectAccounts < ActiveRecord::Migration[7.1]
|
|
2
2
|
def change
|
|
3
|
-
create_table :instagram_connect_accounts do |t|
|
|
3
|
+
create_table :instagram_connect_accounts, if_not_exists: true do |t|
|
|
4
4
|
t.string :auth_path, null: false
|
|
5
5
|
t.string :ig_user_id, null: false
|
|
6
6
|
t.string :page_id
|
|
@@ -11,6 +11,6 @@ class CreateInstagramConnectAccounts < ActiveRecord::Migration[7.1]
|
|
|
11
11
|
t.bigint :connected_by_id
|
|
12
12
|
t.timestamps
|
|
13
13
|
end
|
|
14
|
-
add_index :instagram_connect_accounts, :ig_user_id, unique: true
|
|
14
|
+
add_index :instagram_connect_accounts, :ig_user_id, unique: true, if_not_exists: true
|
|
15
15
|
end
|
|
16
16
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class CreateInstagramConnectConversations < ActiveRecord::Migration[7.1]
|
|
2
2
|
def change
|
|
3
|
-
create_table :instagram_connect_conversations do |t|
|
|
3
|
+
create_table :instagram_connect_conversations, if_not_exists: true do |t|
|
|
4
4
|
t.bigint :account_id, null: false
|
|
5
5
|
t.string :igsid, null: false
|
|
6
6
|
t.string :username
|
|
@@ -11,6 +11,6 @@ class CreateInstagramConnectConversations < ActiveRecord::Migration[7.1]
|
|
|
11
11
|
t.integer :unread_count, default: 0, null: false
|
|
12
12
|
t.timestamps
|
|
13
13
|
end
|
|
14
|
-
add_index :instagram_connect_conversations, [ :account_id, :igsid ], unique: true
|
|
14
|
+
add_index :instagram_connect_conversations, [ :account_id, :igsid ], unique: true, if_not_exists: true
|
|
15
15
|
end
|
|
16
16
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class CreateInstagramConnectMessages < ActiveRecord::Migration[7.1]
|
|
2
2
|
def change
|
|
3
|
-
create_table :instagram_connect_messages do |t|
|
|
3
|
+
create_table :instagram_connect_messages, if_not_exists: true do |t|
|
|
4
4
|
t.bigint :conversation_id, null: false
|
|
5
5
|
t.string :direction, null: false
|
|
6
6
|
t.string :status, null: false
|
|
@@ -19,7 +19,7 @@ class CreateInstagramConnectMessages < ActiveRecord::Migration[7.1]
|
|
|
19
19
|
t.string :failure_reason
|
|
20
20
|
t.timestamps
|
|
21
21
|
end
|
|
22
|
-
add_index :instagram_connect_messages, :conversation_id
|
|
23
|
-
add_index :instagram_connect_messages, :ig_message_id, unique: true
|
|
22
|
+
add_index :instagram_connect_messages, :conversation_id, if_not_exists: true
|
|
23
|
+
add_index :instagram_connect_messages, :ig_message_id, unique: true, if_not_exists: true
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
class CreateInstagramConnectInboundMessages < ActiveRecord::Migration[7.1]
|
|
2
2
|
def change
|
|
3
|
-
create_table :instagram_connect_inbound_messages do |t|
|
|
3
|
+
create_table :instagram_connect_inbound_messages, if_not_exists: true do |t|
|
|
4
4
|
t.string :ig_message_id, null: false
|
|
5
5
|
t.bigint :account_id
|
|
6
6
|
t.datetime :processed_at
|
|
7
7
|
t.timestamps
|
|
8
8
|
end
|
|
9
|
-
add_index :instagram_connect_inbound_messages, :ig_message_id, unique: true
|
|
9
|
+
add_index :instagram_connect_inbound_messages, :ig_message_id, unique: true, if_not_exists: true
|
|
10
10
|
end
|
|
11
11
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class CreateInstagramConnectComments < ActiveRecord::Migration[7.1]
|
|
2
2
|
def change
|
|
3
|
-
create_table :instagram_connect_comments do |t|
|
|
3
|
+
create_table :instagram_connect_comments, if_not_exists: true do |t|
|
|
4
4
|
t.bigint :account_id, null: false
|
|
5
5
|
t.string :media_id
|
|
6
6
|
t.string :comment_id, null: false
|
|
@@ -11,7 +11,7 @@ class CreateInstagramConnectComments < ActiveRecord::Migration[7.1]
|
|
|
11
11
|
t.datetime :replied_at
|
|
12
12
|
t.timestamps
|
|
13
13
|
end
|
|
14
|
-
add_index :instagram_connect_comments, :comment_id, unique: true
|
|
15
|
-
add_index :instagram_connect_comments, :account_id
|
|
14
|
+
add_index :instagram_connect_comments, :comment_id, unique: true, if_not_exists: true
|
|
15
|
+
add_index :instagram_connect_comments, :account_id, if_not_exists: true
|
|
16
16
|
end
|
|
17
17
|
end
|