diff --git a/app/Livewire/EinundzwanzigPlebTable.php b/app/Livewire/EinundzwanzigPlebTable.php index ebc1173..dd688cc 100644 --- a/app/Livewire/EinundzwanzigPlebTable.php +++ b/app/Livewire/EinundzwanzigPlebTable.php @@ -140,8 +140,10 @@ final class EinundzwanzigPlebTable extends PowerGridComponent { $pleb = EinundzwanzigPleb::query()->findOrFail($rowId); $for = $pleb->application_for; + $text = $pleb->application_text; $pleb->association_status = AssociationStatus::from($for); $pleb->application_for = null; + $pleb->archived_application_text = $text; $pleb->application_text = null; $pleb->save(); diff --git a/database/migrations/2024_09_30_171153_add_copy_field_application_text_to_einundzwanzig_plebs_table.php b/database/migrations/2024_09_30_171153_add_copy_field_application_text_to_einundzwanzig_plebs_table.php new file mode 100644 index 0000000..71cdef3 --- /dev/null +++ b/database/migrations/2024_09_30_171153_add_copy_field_application_text_to_einundzwanzig_plebs_table.php @@ -0,0 +1,27 @@ +text('archived_application_text')->nullable()->after('application_text'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('einundzwanzig_plebs', function (Blueprint $table) { + // + }); + } +};