rivet_cms 0.3.0 → 0.3.1

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: 213d7396d375761fb7852801a7de3bdbc96665dfbf68a22481ab52597a6af712
4
- data.tar.gz: a70cbdade635cfa67f7f740ca61e920644cfcca8be76adb5875b26dcaa88749d
3
+ metadata.gz: 45a996115979c8c5f905e87303e0aa250f7057f4596b672746d420c2388a9c35
4
+ data.tar.gz: 430d485c3992bfa605993ccfaf041a41bed1ff1364a6e547dad17ec988052834
5
5
  SHA512:
6
- metadata.gz: 31dde2f891656da10294a6890bf283975193542c4eec680966af12f8920420d61460dc78e15f217a35fa3f96467d9ca2263a739807fa0b489dd5ed79970d9e95
7
- data.tar.gz: cdf8a1a51be31f03e71b5f0f9ae2a0fd12cb4005a697d9b153fa88ed8b4f70238c5b2efd657d39058f69b07d4d8c614849d35759baff962939392500fae68f37
6
+ metadata.gz: 72e400f54ba22b01182598ed8d0c94671dc8133a2bc1caa7f8444e3c620234f11fc91914dcbff38c398e742ef8630baa5185dcd8de8014635918abc2975cc25d
7
+ data.tar.gz: fe96d646e8b1c1a15a8eb694e41948bc6ba73d2b68f32f5758e7ca608601fe9c3b4e6de5fa9fb29f2c5db175a28b774141d735983ab6c5417b9c6596aab6910b
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to RivetCMS are documented here. While the version is
4
4
  below 1.0, minor releases may include breaking changes; each one is listed
5
5
  under a Breaking heading.
6
6
 
7
+ ## 0.3.1 - 2026-08-09
8
+
9
+ ### Fixed
10
+ - Migrations aborted on PostgreSQL and MySQL. Two issues SQLite tolerated but
11
+ stricter databases did not: the components table declared a foreign key to
12
+ `rivet_cms_categories` before that table existed (now added afterward), and
13
+ the fields table set a default on a JSON column, which MySQL rejects (the
14
+ default now lives on the model). Migrations are exercised against Postgres
15
+ and MySQL in CI.
16
+
7
17
  ## 0.3.0 - 2026-08-09
8
18
 
9
19
  ### Added
@@ -9,6 +9,10 @@ module RivetCms
9
9
  belongs_to :component, optional: true
10
10
  has_many :content_values, dependent: :destroy
11
11
 
12
+ # Defaulted here rather than in the DB, since MySQL rejects defaults on
13
+ # JSON columns; keeps config a hash regardless of adapter.
14
+ attribute :config, default: -> { {} }
15
+
12
16
  enum :field_type, {
13
17
  string: 0,
14
18
  text: 1,
@@ -4,7 +4,10 @@ class CreateRivetCmsComponents < ActiveRecord::Migration[7.0]
4
4
  t.string :name, null: false, index: true
5
5
  t.string :slug, null: false
6
6
  t.text :description
7
- t.references :category, foreign_key: { to_table: :rivet_cms_categories }
7
+ # The FK is added in the categories migration, which runs later; adding
8
+ # it here would reference a table that does not exist yet (fine on
9
+ # SQLite, fatal on Postgres).
10
+ t.references :category
8
11
  t.references :organization, foreign_key: { to_table: :rivet_cms_organizations }, null: false
9
12
  t.timestamps
10
13
 
@@ -10,5 +10,8 @@ class CreateRivetCmsCategories < ActiveRecord::Migration[7.0]
10
10
  t.timestamps
11
11
  t.index [ :organization_id, :slug ], unique: true
12
12
  end
13
+
14
+ # Deferred from the components migration, which runs before this table exists
15
+ add_foreign_key :rivet_cms_components, :rivet_cms_categories, column: :category_id
13
16
  end
14
17
  end
@@ -11,7 +11,9 @@ class CreateContentSystemTables < ActiveRecord::Migration[7.0]
11
11
  t.boolean :required, default: false, null: false
12
12
  t.integer :min_items
13
13
  t.integer :max_items
14
- t.json :config, default: {}
14
+ # No DB default: MySQL rejects defaults on JSON columns. The Field model
15
+ # defaults it to {} instead.
16
+ t.json :config
15
17
  t.integer :position, default: 0, null: false
16
18
  t.integer :row, default: 0, null: false
17
19
  t.string :width, default: "full", null: false
@@ -1,3 +1,3 @@
1
1
  module RivetCms
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rivet_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - narch