mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Store theme sprites in the DB (#20501)
Let's avoid fetching sprites from the CDN during page rendering.
This commit is contained in:
committed by
GitHub
parent
e6c04e2dc2
commit
84f590ab83
15
db/migrate/20230224193734_create_theme_svg_sprite.rb
Normal file
15
db/migrate/20230224193734_create_theme_svg_sprite.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateThemeSvgSprite < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :theme_svg_sprites do |t|
|
||||
t.integer :theme_id, null: false
|
||||
t.integer :upload_id, null: false
|
||||
t.binary :sprite, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :theme_svg_sprites, :theme_id, unique: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user