Skip to content

Commit 37f274b

Browse files
princetechsclaude
andcommitted
Add migrations for solid_cache_entries and solid_cable_messages tables
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 28ae67c commit 37f274b

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class CreateSolidCableMessages < ActiveRecord::Migration[8.0]
2+
def change
3+
return if table_exists?(:solid_cable_messages)
4+
5+
create_table :solid_cable_messages do |t|
6+
t.binary :channel, limit: 1024, null: false
7+
t.binary :payload, limit: 536870912, null: false
8+
t.datetime :created_at, null: false
9+
t.integer :channel_hash, limit: 8, null: false
10+
end
11+
12+
add_index :solid_cable_messages, :channel
13+
add_index :solid_cable_messages, :channel_hash
14+
add_index :solid_cable_messages, :created_at
15+
end
16+
end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
class CreateSolidCacheEntries < ActiveRecord::Migration[8.0]
2+
def change
3+
return if table_exists?(:solid_cache_entries)
4+
5+
create_table :solid_cache_entries do |t|
6+
t.binary :key, limit: 1024, null: false
7+
t.binary :value, limit: 536870912, null: false
8+
t.datetime :created_at, null: false
9+
t.integer :key_hash, limit: 8, null: false
10+
t.integer :byte_size, limit: 4, null: false
11+
end
12+
13+
add_index :solid_cache_entries, :byte_size
14+
add_index :solid_cache_entries, [ :key_hash, :byte_size ]
15+
add_index :solid_cache_entries, :key_hash, unique: true
16+
end
17+
end

0 commit comments

Comments
 (0)