Files
fewo-stommer/database/migrations/2026_11_02_090000_add_document_releases.php
LarsandClaude Opus 5.5 cf11c8a474
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m59s
Dokumentenzusammenstellung und Vorlagensteuerung (Paket 3, Prozessarchitektur v0.10)
Eine Zusammenstellung vor jedem Dokument (Angebot, Bestaetigung, Buchungsunterlagen
extern), Dokumentart je Vorgangsart, Freigaben fuer Vorlagen und Dokumentarten,
Schutz vor unvereinbarten Bedingungen bei Portalbuchungen (E-004), kein doppelter
Versand, Absicherung Hold 0 bis Paket 7, A6-Aufenthaltsbestaetigung vorbereitet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 19:44:52 +01:00

45 lines
1.8 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
/**
* Package 3 of UMSETZUNGSPLAN_v0.10 (documents): a contract template version is released for guests or not, and it may
* be confirmed as reproducing only what guests accept when booking on a portal (E-004). The landlord releases the texts
* of each document kind (tenants.document_releases).
*
* Existing template versions were used without such a release so far; they count as released to keep today's offers
* and confirmations working. None is confirmed as portal terms – that is the landlord's statement to make.
*/
return new class extends Migration
{
public function up(): void
{
Schema::table('contract_templates', function (Blueprint $table): void {
$table->timestamp('released_at')->nullable();
$table->string('released_by', 120)->nullable();
$table->timestamp('portal_terms_confirmed_at')->nullable();
$table->string('portal_terms_confirmed_by', 120)->nullable();
});
Schema::table('tenants', function (Blueprint $table): void {
$table->json('document_releases')->nullable();
});
DB::table('contract_templates')->update(['released_at' => now(), 'released_by' => 'Übernahme (bisher schon verwendet)']);
}
public function down(): void
{
Schema::table('contract_templates', function (Blueprint $table): void {
$table->dropColumn(['released_at', 'released_by', 'portal_terms_confirmed_at', 'portal_terms_confirmed_by']);
});
Schema::table('tenants', function (Blueprint $table): void {
$table->dropColumn('document_releases');
});
}
};