Download the PHP package golded-dev/laravel-ftn-database without Composer
On this page you can find all versions of the php package golded-dev/laravel-ftn-database. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download golded-dev/laravel-ftn-database
More information about golded-dev/laravel-ftn-database
Files in golded-dev/laravel-ftn-database
Package laravel-ftn-database
Short Description Laravel schema and base models for imported FTN archive facts.
License MIT
Homepage https://github.com/golded-dev/laravel-ftn-database
Informations about the package laravel-ftn-database
Laravel FTN Database
Laravel schema and base Eloquent models for imported FTN archive facts.
This package owns the durable facts that come from FTN message archives: areas, messages, source identity, addressing, bodies, reply metadata, control lines, and import provenance.
It does not own reader UI state. Read flags, bookmarks, cached counters, and current positions belong in the consuming app.
Installation
Requires PHP 8.4+ and Laravel 13 components.
Supported database targets:
- SQLite
- MySQL
- PostgreSQL
What It Provides
Golded\Ftn\Database\FtnDatabaseServiceProviderGolded\Ftn\Database\Models\AreaGolded\Ftn\Database\Models\Message- config publishing through the
ftn-database-configtag - migration publishing through the
ftn-database-migrationstag - package migrations that load by default
Migrations
The package creates areas and messages.
Package migrations load automatically unless the consumer disables them:
Publish migrations when the app needs to own the files directly:
control_lines_json and provenance_json are text-backed JSON payloads with array casts on the model. That keeps SQLite, MySQL, and PostgreSQL behavior plain.
Config
Publish the config:
Default config:
Apps can point relationships at subclasses:
The base relationships resolve through config. They do not know about App\Models.
Models
Use the base models directly for archive-only apps:
For GoldED-style apps, subclass the models and add only app-owned state:
Keep imported archive facts in the package columns. Keep reader behavior in the app.
Identity
The import identity is:
area_idsource_typesource_uid
msgno is display and navigation metadata. It is not identity.
external_id is unique only inside an area. Multiple null external IDs are allowed.
Development
Install dependencies:
Run tests:
Run static analysis:
Run Rector dry-run:
Run everything:
The MySQL migration check is skipped unless these environment variables are set:
FTN_DATABASE_MYSQL_DATABASEFTN_DATABASE_MYSQL_HOSTFTN_DATABASE_MYSQL_PORTFTN_DATABASE_MYSQL_USERNAMEFTN_DATABASE_MYSQL_PASSWORD
The PostgreSQL migration check is skipped unless these environment variables are set:
FTN_DATABASE_POSTGRES_DATABASEFTN_DATABASE_POSTGRES_HOSTFTN_DATABASE_POSTGRES_PORTFTN_DATABASE_POSTGRES_USERNAMEFTN_DATABASE_POSTGRES_PASSWORD
Versioning
This package starts at 1.0.0 and uses semantic versioning.
Breaking changes include schema changes, model fillable or cast changes that affect persisted data, service provider behavior changes, and supported Laravel or PHP version changes.
Contributing
Contributions are welcome when they keep the archive/app boundary sharp. See CONTRIBUTING.md.
Security
Do not report security issues in public tickets. See SECURITY.md.
Changelog
See CHANGELOG.md.
License
Released under the MIT License. See LICENSE.