You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Studio can now store files larger than 2.1 GB (#5974). But publish still exports only the legacy 32-bit LocalFile.file_size, which cannot represent them. This adds a 64-bit file_size_bigint column to the exported content database, populated at publish. New Kolibri (learningequality/kolibri#14881) reads the true size; old Kolibri keeps reading the legacy column. Ships with the merged included_presets change (#6004) in the same content-schema hotfix.
Complexity: Low Target branch: hotfixes
Context
Studio generates the content database through the vendored kolibri_content schema (base_models.py).
create_associated_file_objects (publish.py:644) writes LocalFile rows through those models.
I used Claude (Opus 4.8, via le-skills:writing-github-issues) to draft this issue against the merged included_presets export (#6004) and the Kolibri counterpart (#14881). The design was mine; Claude mapped the code and wrote it up.
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Studio can now store files larger than 2.1 GB (#5974). But publish still exports only the legacy 32-bit
LocalFile.file_size, which cannot represent them. This adds a 64-bitfile_size_bigintcolumn to the exported content database, populated at publish. New Kolibri (learningequality/kolibri#14881) reads the true size; old Kolibri keeps reading the legacy column. Ships with the mergedincluded_presetschange (#6004) in the same content-schema hotfix.Complexity: Low
Target branch: hotfixes
Context
kolibri_contentschema (base_models.py).create_associated_file_objects(publish.py:644) writesLocalFilerows through those models.included_presetschange (Publish a renderer-preset bitmask (File.included_presets) into the content database #6004).file_size_bigintinto that schema — no further version bump.MIN_SCHEMA_VERSIONstays"1"(publish.py:67), so old Kolibri still imports.LocalFile.file_size_bigintdirectly.file_sizemapped into it instead.file_size_bigintis aLocalFilecolumn only.File.kolibri_contentexport mirror and thekolibri_publicAPI mirror derive frombase_models.LocalFile.The Change
file_size_bigintBigIntegerFieldtoLocalFileinbase_models.py, keeping the legacyfile_size.kolibri_content/0025_*andkolibri_public/0010_*.create_associated_file_objects(publish.py:661), setfile_size_bigintto the real size on everyLocalFile.file_sizeto the real size when it fits in 32 bits, elseNULL.Out of Scope
Filemodel — Kolibri reads size fromLocalFileonly.File.file_sizestorage column (Widen File.file_size to 64-bit (bigint) via zero-downtime expand/contract #5974, done).published_sizeaggregate (publish.py:936).Acceptance Criteria
General
LocalFilein the export models carries a nullablefile_size_bigintalongside the legacyfile_size.kolibri_contentandkolibri_publicmirrors migrate the new column.NULLfor that file's size.Testing
file_sizeandfile_size_bigint.file_size_bigintandNULLtofile_size.References
contentcuration/contentcuration/utils/publish.py—create_associated_file_objects,MIN_SCHEMA_VERSIONcontentcuration/kolibri_content/base_models.py—LocalFileLocalFile.file_size_bigintcounterpartFile.included_presets) into the content database #6004 — sibling content-schema change (included_presets)AI usage
I used Claude (Opus 4.8, via
le-skills:writing-github-issues) to draft this issue against the mergedincluded_presetsexport (#6004) and the Kolibri counterpart (#14881). The design was mine; Claude mapped the code and wrote it up.