mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Take 2 of switching to psql cache!
This commit is contained in:
15
db/migrate/20250628011017_create_solid_cache_entries.rb
Normal file
15
db/migrate/20250628011017_create_solid_cache_entries.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateSolidCacheEntries < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :solid_cache_entries do |t|
|
||||
t.binary :key, limit: 1024, null: false
|
||||
t.binary :value, limit: 536870912, null: false
|
||||
t.datetime :created_at, null: false
|
||||
t.integer :key_hash, limit: 8, null: false
|
||||
t.integer :byte_size, limit: 4, null: false
|
||||
|
||||
t.index :byte_size
|
||||
t.index [ :key_hash, :byte_size ]
|
||||
t.index :key_hash, unique: true
|
||||
end
|
||||
end
|
||||
end
|
||||
13
db/schema.rb
generated
13
db/schema.rb
generated
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_06_26_001500) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_06_28_011017) do
|
||||
create_schema "pganalyze"
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
@@ -472,6 +472,17 @@ ActiveRecord::Schema[8.0].define(version: 2025_06_26_001500) do
|
||||
t.index ["user_id"], name: "index_sign_in_tokens_on_user_id"
|
||||
end
|
||||
|
||||
create_table "solid_cache_entries", force: :cascade do |t|
|
||||
t.binary "key", null: false
|
||||
t.binary "value", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "key_hash", null: false
|
||||
t.integer "byte_size", null: false
|
||||
t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size"
|
||||
t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size"
|
||||
t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true
|
||||
end
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
t.string "slack_uid"
|
||||
t.datetime "created_at", null: false
|
||||
|
||||
Reference in New Issue
Block a user