collavre_openclaw 0.1.0 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cefe1bfe3e0bc5a5d810a0aea5543e468a6539ec26aa48515a1617340a1ea6b
4
- data.tar.gz: 4c48629590b7b95ada9771d18c42bce1db9ea97a3532bc081e0ec3fc80115d16
3
+ metadata.gz: 6ea44c34555f598c15ad28c01b082dc75b6b1e7d2fcd80b116fe51d7aed133a0
4
+ data.tar.gz: 478d170da5c544ef32d3d709fa0011fd2af3d73f5b709440909b8b1895e343ba
5
5
  SHA512:
6
- metadata.gz: ab7224c85ec72ea2d7bed38257136495a0e6fc8b74a33c558373bd822bba5b1be92c594bbdbdb22a67836afc02a6e350bcd9923b31767a454d5af279424473de
7
- data.tar.gz: 0d8adb020df29a332597afbe9964b19e77cb35d79744487c935fe759e6aa75593812f9a245d9c1b462ec0f7e19a1f90d6027f7ddde0997509952b543c915942d
6
+ metadata.gz: 74a3c5f8a063bebfe3fd10481db62cbd564f3d07af5f355e95a1c84fccebd0220094ae00e12adb9080ae67a6877824765c03d47de2ae4953f4baba8c534bd3dc
7
+ data.tar.gz: 11af895cbdba2f0376802d6de9bae9771498724568c2aac5363ed32ea6b6afd5df01d31c8ff301a29c4f6e9c7cc8436f225836545e46c0e94f3a1b8a2e16c232
@@ -0,0 +1,5 @@
1
+ class RemoveDescriptionFromOpenclawAccounts < ActiveRecord::Migration[8.1]
2
+ def change
3
+ remove_column :openclaw_accounts, :description, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class RemoveAgentProvisionedAtFromOpenclawAccounts < ActiveRecord::Migration[8.1]
2
+ def change
3
+ remove_column :openclaw_accounts, :agent_provisioned_at, :datetime
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class RemoveAgentIdFromOpenclawAccounts < ActiveRecord::Migration[7.2]
2
+ def change
3
+ remove_column :openclaw_accounts, :agent_id, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class RenameApiTokenToApiKeyInOpenclawAccounts < ActiveRecord::Migration[7.2]
2
+ def change
3
+ rename_column :openclaw_accounts, :api_token, :api_key
4
+ end
5
+ end
@@ -0,0 +1,52 @@
1
+ class MigratePendingCallbacksToUser < ActiveRecord::Migration[7.2]
2
+ def up
3
+ # Add user_id column
4
+ add_column :openclaw_pending_callbacks, :user_id, :integer
5
+
6
+ # Migrate existing data
7
+ execute <<-SQL
8
+ UPDATE openclaw_pending_callbacks
9
+ SET user_id = (
10
+ SELECT user_id FROM openclaw_accounts
11
+ WHERE openclaw_accounts.id = openclaw_pending_callbacks.openclaw_account_id
12
+ )
13
+ SQL
14
+
15
+ # Remove old foreign key and column
16
+ remove_foreign_key :openclaw_pending_callbacks, :openclaw_accounts
17
+ remove_index :openclaw_pending_callbacks, :openclaw_account_id
18
+ remove_column :openclaw_pending_callbacks, :openclaw_account_id
19
+
20
+ # Add new foreign key
21
+ add_foreign_key :openclaw_pending_callbacks, :users
22
+ add_index :openclaw_pending_callbacks, :user_id
23
+
24
+ # Make user_id not null (after data migration)
25
+ change_column_null :openclaw_pending_callbacks, :user_id, false
26
+ end
27
+
28
+ def down
29
+ # Add back openclaw_account_id
30
+ add_column :openclaw_pending_callbacks, :openclaw_account_id, :integer
31
+
32
+ # Migrate data back (if openclaw_accounts still exists)
33
+ execute <<-SQL
34
+ UPDATE openclaw_pending_callbacks
35
+ SET openclaw_account_id = (
36
+ SELECT id FROM openclaw_accounts
37
+ WHERE openclaw_accounts.user_id = openclaw_pending_callbacks.user_id
38
+ LIMIT 1
39
+ )
40
+ SQL
41
+
42
+ # Remove user foreign key
43
+ remove_foreign_key :openclaw_pending_callbacks, :users
44
+ remove_index :openclaw_pending_callbacks, :user_id
45
+ remove_column :openclaw_pending_callbacks, :user_id
46
+
47
+ # Add back original foreign key
48
+ add_foreign_key :openclaw_pending_callbacks, :openclaw_accounts
49
+ add_index :openclaw_pending_callbacks, :openclaw_account_id
50
+ change_column_null :openclaw_pending_callbacks, :openclaw_account_id, false
51
+ end
52
+ end
@@ -0,0 +1,18 @@
1
+ class DropOpenclawAccounts < ActiveRecord::Migration[7.2]
2
+ def up
3
+ drop_table :openclaw_accounts
4
+ end
5
+
6
+ def down
7
+ create_table :openclaw_accounts do |t|
8
+ t.integer :user_id, null: false
9
+ t.string :gateway_url, null: false
10
+ t.string :api_key
11
+ t.string :channel_id
12
+
13
+ t.timestamps
14
+ end
15
+
16
+ add_index :openclaw_accounts, :user_id, unique: true
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module CollavreOpenclaw
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collavre_openclaw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collavre
@@ -63,6 +63,12 @@ files:
63
63
  - db/migrate/20260201000001_create_pending_callbacks.rb
64
64
  - db/migrate/20260202000001_remove_webhook_secret_from_openclaw_accounts.rb
65
65
  - db/migrate/20260202074949_add_agent_id_to_openclaw_accounts.rb
66
+ - db/migrate/20260202120143_remove_description_from_openclaw_accounts.rb
67
+ - db/migrate/20260202120254_remove_agent_provisioned_at_from_openclaw_accounts.rb
68
+ - db/migrate/20260202130000_remove_agent_id_from_openclaw_accounts.rb
69
+ - db/migrate/20260202140000_rename_api_token_to_api_key_in_openclaw_accounts.rb
70
+ - db/migrate/20260202150001_migrate_pending_callbacks_to_user.rb
71
+ - db/migrate/20260202150002_drop_openclaw_accounts.rb
66
72
  - lib/collavre_openclaw.rb
67
73
  - lib/collavre_openclaw/configuration.rb
68
74
  - lib/collavre_openclaw/engine.rb