Skip to content

Commit f92f512

Browse files
committed
fix(ci): generate the SQLITE schema.rb files
1 parent 6f7fa76 commit f92f512

File tree

3 files changed

+107
-76
lines changed

3 files changed

+107
-76
lines changed

db/migrate/20250305221045_create_maglev_sections_content_stores.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ def change
55

66
t.string :handle, null: false, index: true
77

8-
t.jsonb :sections_translations, default: {}
8+
if t.respond_to? :jsonb
9+
t.jsonb :sections_translations, default: {}
10+
else
11+
t.json :sections_translations, default: {}
12+
end
913

1014
t.integer :lock_version
1115

spec/dummy/db/schema.sqlite.rb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[8.0].define(version: 2022_06_12_092235) do
13+
ActiveRecord::Schema[8.0].define(version: 2025_03_07_104536) do
1414
create_table "accounts", force: :cascade do |t|
1515
t.string "email"
1616
t.string "password_digest"
@@ -78,6 +78,19 @@
7878
t.json "og_title_translations", default: {}
7979
t.json "og_description_translations", default: {}
8080
t.json "og_image_url_translations", default: {}
81+
t.string "layout_id"
82+
t.index ["layout_id"], name: "index_maglev_pages_on_layout_id"
83+
end
84+
85+
create_table "maglev_sections_content_stores", force: :cascade do |t|
86+
t.integer "maglev_page_id"
87+
t.string "handle", null: false
88+
t.json "sections_translations", default: {}
89+
t.integer "lock_version"
90+
t.datetime "created_at", null: false
91+
t.datetime "updated_at", null: false
92+
t.index ["handle"], name: "index_maglev_sections_content_stores_on_handle"
93+
t.index ["maglev_page_id"], name: "index_maglev_sections_content_stores_on_maglev_page_id"
8194
end
8295

8396
create_table "maglev_sites", force: :cascade do |t|
@@ -101,4 +114,5 @@
101114

102115
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
103116
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
117+
add_foreign_key "maglev_sections_content_stores", "maglev_pages"
104118
end

spec/legacy_dummy/db/schema.sqlite.rb

Lines changed: 87 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -10,96 +10,109 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 20_220_612_092_235) do
14-
create_table 'accounts', force: :cascade do |t|
15-
t.string 'email'
16-
t.string 'password_digest'
17-
t.datetime 'created_at', null: false
18-
t.datetime 'updated_at', null: false
13+
ActiveRecord::Schema[7.2].define(version: 2025_03_07_104536) do
14+
create_table "accounts", force: :cascade do |t|
15+
t.string "email"
16+
t.string "password_digest"
17+
t.datetime "created_at", null: false
18+
t.datetime "updated_at", null: false
1919
end
2020

21-
create_table 'active_storage_attachments', force: :cascade do |t|
22-
t.string 'name', null: false
23-
t.string 'record_type', null: false
24-
t.integer 'record_id', null: false
25-
t.integer 'blob_id', null: false
26-
t.datetime 'created_at', precision: nil, null: false
27-
t.index ['blob_id'], name: 'index_active_storage_attachments_on_blob_id'
28-
t.index %w[record_type record_id name blob_id], name: 'index_active_storage_attachments_uniqueness',
29-
unique: true
21+
create_table "active_storage_attachments", force: :cascade do |t|
22+
t.string "name", null: false
23+
t.string "record_type", null: false
24+
t.integer "record_id", null: false
25+
t.integer "blob_id", null: false
26+
t.datetime "created_at", precision: nil, null: false
27+
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
28+
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
3029
end
3130

32-
create_table 'active_storage_blobs', force: :cascade do |t|
33-
t.string 'key', null: false
34-
t.string 'filename', null: false
35-
t.string 'content_type'
36-
t.text 'metadata'
37-
t.bigint 'byte_size', null: false
38-
t.string 'checksum', null: false
39-
t.datetime 'created_at', precision: nil, null: false
40-
t.string 'service_name', null: false
41-
t.index ['key'], name: 'index_active_storage_blobs_on_key', unique: true
31+
create_table "active_storage_blobs", force: :cascade do |t|
32+
t.string "key", null: false
33+
t.string "filename", null: false
34+
t.string "content_type"
35+
t.text "metadata"
36+
t.bigint "byte_size", null: false
37+
t.string "checksum", null: false
38+
t.datetime "created_at", precision: nil, null: false
39+
t.string "service_name", null: false
40+
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
4241
end
4342

44-
create_table 'active_storage_variant_records', force: :cascade do |t|
45-
t.integer 'blob_id', null: false
46-
t.string 'variation_digest', null: false
47-
t.index %w[blob_id variation_digest], name: 'index_active_storage_variant_records_uniqueness', unique: true
43+
create_table "active_storage_variant_records", force: :cascade do |t|
44+
t.integer "blob_id", null: false
45+
t.string "variation_digest", null: false
46+
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
4847
end
4948

50-
create_table 'maglev_assets', force: :cascade do |t|
51-
t.string 'filename'
52-
t.string 'content_type'
53-
t.integer 'width'
54-
t.integer 'height'
55-
t.integer 'byte_size'
56-
t.datetime 'created_at', null: false
57-
t.datetime 'updated_at', null: false
49+
create_table "maglev_assets", force: :cascade do |t|
50+
t.string "filename"
51+
t.string "content_type"
52+
t.integer "width"
53+
t.integer "height"
54+
t.integer "byte_size"
55+
t.datetime "created_at", null: false
56+
t.datetime "updated_at", null: false
5857
end
5958

60-
create_table 'maglev_page_paths', force: :cascade do |t|
61-
t.bigint 'maglev_page_id'
62-
t.string 'locale', null: false
63-
t.string 'value', null: false
64-
t.boolean 'canonical', default: true
65-
t.index %w[canonical locale value], name: 'canonical_speed'
66-
t.index %w[canonical maglev_page_id locale], name: 'scoped_canonical_speed'
67-
t.index ['maglev_page_id'], name: 'index_maglev_page_paths_on_maglev_page_id'
59+
create_table "maglev_page_paths", force: :cascade do |t|
60+
t.bigint "maglev_page_id"
61+
t.string "locale", null: false
62+
t.string "value", null: false
63+
t.boolean "canonical", default: true
64+
t.index ["canonical", "locale", "value"], name: "canonical_speed"
65+
t.index ["canonical", "maglev_page_id", "locale"], name: "scoped_canonical_speed"
66+
t.index ["maglev_page_id"], name: "index_maglev_page_paths_on_maglev_page_id"
6867
end
6968

70-
create_table 'maglev_pages', force: :cascade do |t|
71-
t.boolean 'visible', default: true
72-
t.datetime 'created_at', null: false
73-
t.datetime 'updated_at', null: false
74-
t.json 'title_translations', default: {}
75-
t.json 'seo_title_translations', default: {}
76-
t.json 'meta_description_translations', default: {}
77-
t.json 'sections_translations', default: {}
78-
t.integer 'lock_version'
79-
t.json 'og_title_translations', default: {}
80-
t.json 'og_description_translations', default: {}
81-
t.json 'og_image_url_translations', default: {}
69+
create_table "maglev_pages", force: :cascade do |t|
70+
t.boolean "visible", default: true
71+
t.datetime "created_at", null: false
72+
t.datetime "updated_at", null: false
73+
t.json "title_translations", default: {}
74+
t.json "seo_title_translations", default: {}
75+
t.json "meta_description_translations", default: {}
76+
t.json "sections_translations", default: {}
77+
t.integer "lock_version"
78+
t.json "og_title_translations", default: {}
79+
t.json "og_description_translations", default: {}
80+
t.json "og_image_url_translations", default: {}
81+
t.string "layout_id"
82+
t.index ["layout_id"], name: "index_maglev_pages_on_layout_id"
8283
end
8384

84-
create_table 'maglev_sites', force: :cascade do |t|
85-
t.string 'name'
86-
t.datetime 'created_at', null: false
87-
t.datetime 'updated_at', null: false
88-
t.json 'locales', default: []
89-
t.json 'sections_translations', default: {}
90-
t.integer 'lock_version'
91-
t.json 'style', default: []
85+
create_table "maglev_sections_content_stores", force: :cascade do |t|
86+
t.integer "maglev_page_id"
87+
t.string "handle", null: false
88+
t.json "sections_translations", default: {}
89+
t.integer "lock_version"
90+
t.datetime "created_at", null: false
91+
t.datetime "updated_at", null: false
92+
t.index ["handle"], name: "index_maglev_sections_content_stores_on_handle"
93+
t.index ["maglev_page_id"], name: "index_maglev_sections_content_stores_on_maglev_page_id"
9294
end
9395

94-
create_table 'products', force: :cascade do |t|
95-
t.string 'name'
96-
t.string 'sku'
97-
t.float 'price'
98-
t.boolean 'sold_out', default: false
99-
t.datetime 'created_at', null: false
100-
t.datetime 'updated_at', null: false
96+
create_table "maglev_sites", force: :cascade do |t|
97+
t.string "name"
98+
t.datetime "created_at", null: false
99+
t.datetime "updated_at", null: false
100+
t.json "locales", default: []
101+
t.json "sections_translations", default: {}
102+
t.integer "lock_version"
103+
t.json "style", default: []
101104
end
102105

103-
add_foreign_key 'active_storage_attachments', 'active_storage_blobs', column: 'blob_id'
104-
add_foreign_key 'active_storage_variant_records', 'active_storage_blobs', column: 'blob_id'
106+
create_table "products", force: :cascade do |t|
107+
t.string "name"
108+
t.string "sku"
109+
t.float "price"
110+
t.boolean "sold_out", default: false
111+
t.datetime "created_at", null: false
112+
t.datetime "updated_at", null: false
113+
end
114+
115+
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
116+
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
117+
add_foreign_key "maglev_sections_content_stores", "maglev_pages"
105118
end

0 commit comments

Comments
 (0)