> For the complete documentation index, see [llms.txt](https://alaniso-de.gitbook.io/alaf-framework/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alaniso-de.gitbook.io/alaf-framework/setup.md).

# Setup

## Setup starten

Das initiale Setup wird bei der Neuinstallation des Frameworks automatisch angestoßen.&#x20;

Eine weitere Möglichkeit ist es, das Setup als Administrator im "Backend" zu starten.

Dabei werden folgende Installationspunkte von der Setup-Routine analysiert und dem Administrator zur Ausführung angeboten:

![Das Setup führt eine Analyse der notwendigen Aktivitäten durch...](/files/-Lc6dMeQIGzp-3EQXg_1)

* Anlage der benötigten Datenbanktabellen
* Anpassung bestehender Datenbanktabellen (Strukturänderungen)
* Ausführung von Setup-Skripten
* Löschen von veralteten Dateien

## Datenbanktabellen

Neue oder zu ändernde Datenbanktabellen werden aus der modulbezogenen Konfigurationsdatei `tabledef.xml` im jeweiligen Unterordner `modules/Modul_123/core/` ermittelt.

## Setup-Skripte

Während eines Setups ist es möglich, dass Datensätze überarbeitet bzw. angelegt werden.

Die Datenmanipulationen werden aus der modulbezogenen Konfigurationsdatei `tabledata.php` im jeweiligen Unterordner `modules/Modul_123/core/` ermittelt.

### Beispiel:

{% content-ref url="/pages/-Lc6xUzeoHXpOj8lnfPd" %}
[tabledata.php](/alaf-framework/beispiele/tabledata.php.md)
{% endcontent-ref %}

## Alte Dateien zur Löschung

Gerade bei Versionswechsel von Softwaremodulen kommt es vor, dass sich die Dateistruktur der Programm- oder Konfigurationsdateien ändert. Um alte Dateien vom Webserver zu löschen, bietet die Setup-Funktion vom alaf-Framework folgende Möglichkeit an:

Zu löschende Dateien werden aus der modulbezogenen Konfigurationsdatei `cleanup.files.php` im jeweiligen Unterordner `modules/Modul_123/core/` ermittelt.

Falls vorhanden, enthält diese Datei 2 array-Variablen (`$deldirs[]` und `$delfiles[]` ), die während der Setup-Funktion die zu löschenden Betriebssystem-Verzeichnisse und -Dateien enthält.

### Beispiel:&#x20;

{% content-ref url="/pages/-Lc6t\_UUB3DkLl1\_2nKa" %}
[cleanup.files.php](/alaf-framework/beispiele/cleanup.files.php.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://alaniso-de.gitbook.io/alaf-framework/setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
