Skip to content

Commit

Permalink
Change references to jsonb to json
Browse files Browse the repository at this point in the history
  • Loading branch information
Bramjetten committed Oct 8, 2024
1 parent 11e02de commit a63c25b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/models/spina/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def to_s
# Spina previously stored account preferences with symbols as keys.
# Because of CVE-2022-32224 we're changing that to strings instead.
# This fallback ensures backwards compatibility, but in the long run this
# should be refactored to use a simple JSONB-column with Postgres.
# should be refactored to use a simple JSON-column with Postgres.
def self.serialized_attr_accessor(*args)
args.each do |method_name|
define_method method_name do
Expand Down
7 changes: 0 additions & 7 deletions spina.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ Gem::Specification.new do |gem|
gem.summary = "Spina"
gem.description = "CMS"
gem.license = "MIT"
gem.post_install_message = %q{
Spina v2.16 includes a new migration, don't forget to run spina:install:migrations.
For details on this specific release, refer to the CHANGELOG file.
https://github.com/SpinaCMS/Spina/blob/main/CHANGELOG.md#2160-august-23rd-2022
}

gem.required_ruby_version = ">= 2.7.0"

Expand All @@ -35,7 +29,6 @@ Gem::Specification.new do |gem|

gem.add_dependency "rails", ">= 6.0"
gem.add_dependency "sprockets-rails"
# gem.add_dependency "pg"
gem.add_dependency "bcrypt"
gem.add_dependency "image_processing"
gem.add_dependency "ancestry"
Expand Down
8 changes: 4 additions & 4 deletions test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.boolean "robots_allowed", default: false
t.jsonb "json_attributes"
t.json "json_attributes"
end

create_table "spina_attachment_collections", id: :serial, force: :cascade do |t|
Expand Down Expand Up @@ -193,7 +193,7 @@
t.integer "position"
t.boolean "active", default: true
t.integer "resource_id"
t.jsonb "json_attributes"
t.json "json_attributes"
t.integer "ancestry_depth", default: 0
t.integer "ancestry_children_count"
t.index ["resource_id"], name: "index_spina_pages_on_resource_id"
Expand All @@ -207,7 +207,7 @@
t.string "order_by"
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.jsonb "slug"
t.json "slug"
t.index ["parent_page_id"], name: "index_spina_resources_on_parent_page_id"
end

Expand All @@ -220,7 +220,7 @@

create_table "spina_settings", id: :serial, force: :cascade do |t|
t.string "plugin"
t.jsonb "preferences", default: {}
t.json "preferences", default: {}
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["plugin"], name: "index_spina_settings_on_plugin"
Expand Down

0 comments on commit a63c25b

Please sign in to comment.