fix(licenses): add missing database migration v340 for license system columns #389

Closed
opened 2026-06-01 09:20:46 +00:00 by jmiller · 2 comments
Owner

Summary

Multiple columns added to license models lack corresponding migrations. Need a single migration to sync all missing columns.

license_key table

  • key_raw TEXT (renamed from key_plain in v337)
  • payment_ref VARCHAR(255) UNIQUE
  • last_heartbeat_unix BIGINT NOT NULL DEFAULT 0

update_stream_config table

  • licensing_enabled BOOL NOT NULL DEFAULT false
  • extension_name TEXT
  • display_name TEXT
  • description TEXT
  • extension_type VARCHAR(50)
  • maintainer TEXT
  • maintainer_url TEXT
  • info_url TEXT
  • target_version TEXT
  • php_minimum VARCHAR(20)

Test Plan

  • Run migration on existing database
  • Verify all columns exist after migration
  • Verify no data loss on existing records

🤖 Generated with Claude Code

## Summary Multiple columns added to license models lack corresponding migrations. Need a single migration to sync all missing columns. ### license_key table - `key_raw TEXT` (renamed from key_plain in v337) - `payment_ref VARCHAR(255) UNIQUE` - `last_heartbeat_unix BIGINT NOT NULL DEFAULT 0` ### update_stream_config table - `licensing_enabled BOOL NOT NULL DEFAULT false` - `extension_name TEXT` - `display_name TEXT` - `description TEXT` - `extension_type VARCHAR(50)` - `maintainer TEXT` - `maintainer_url TEXT` - `info_url TEXT` - `target_version TEXT` - `php_minimum VARCHAR(20)` ## Test Plan - [ ] Run migration on existing database - [ ] Verify all columns exist after migration - [ ] Verify no data loss on existing records 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

Testing Plan — Migration v340

API / DB

  • Fresh install creates all tables with all columns
  • Existing install runs migration without errors
  • license_key: key_raw, payment_ref (UNIQUE), last_heartbeat_unix, first_used_unix columns exist
  • license_package: is_archived, domain_lock_hours columns exist
  • update_stream_config: licensing_enabled, download_gating, support_url, and all extension metadata columns exist
  • Verify no data loss on existing records
  • PaymentRef UNIQUE constraint enforced (duplicate insert fails)

🤖 Generated with Claude Code

## Testing Plan — Migration v340 ### API / DB - [ ] Fresh install creates all tables with all columns - [ ] Existing install runs migration without errors - [ ] license_key: key_raw, payment_ref (UNIQUE), last_heartbeat_unix, first_used_unix columns exist - [ ] license_package: is_archived, domain_lock_hours columns exist - [ ] update_stream_config: licensing_enabled, download_gating, support_url, and all extension metadata columns exist - [ ] Verify no data loss on existing records - [ ] PaymentRef UNIQUE constraint enforced (duplicate insert fails) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jmiller added the pending: testing label 2026-06-01 10:13:53 +00:00
jmiller reopened this issue 2026-06-02 11:21:42 +00:00
Author
Owner

Tested and verified in production on MokoWaaS. All three download gating modes (none/prerelease/all), feed visibility, XML metadata, download URLs, and access control confirmed working.

Tested and verified in production on MokoWaaS. All three download gating modes (none/prerelease/all), feed visibility, XML metadata, download URLs, and access control confirmed working.
Sign in to join this conversation.
No labels pending: testing
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#389