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 +4 -4
- data/CHANGELOG.md +10 -0
- data/app/models/rivet_cms/field.rb +4 -0
- data/db/migrate/20251121020625_create_rivet_cms_components.rb +4 -1
- data/db/migrate/20251121040115_create_rivet_cms_categories.rb +3 -0
- data/db/migrate/20260119185946_create_content_system_tables.rb +3 -1
- data/lib/rivet_cms/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45a996115979c8c5f905e87303e0aa250f7057f4596b672746d420c2388a9c35
|
|
4
|
+
data.tar.gz: 430d485c3992bfa605993ccfaf041a41bed1ff1364a6e547dad17ec988052834
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
data/lib/rivet_cms/version.rb
CHANGED