> For the complete documentation index, see [llms.txt](https://gocomedyfunstoredocs.gitbook.io/gocomedyfun-store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gocomedyfunstoredocs.gitbook.io/gocomedyfun-store/scripts-paid/service-fun/english/installation/sql.md).

# SQL

#### 1. Open your database

* Launch **phpMyAdmin** (depending on what you use with XAMPP, or your hosting provider).
* Log in with your credentials (host, username, password)

#### 2. Choose your database

* In the list on the left, click on the database used by your server

#### 3. Import the file `.sql`

* Click on Import (or Execute SQL query)
* Launch the import

#### 4. Check

* If you see the **new tables** or **columns** in your database → it's installed ✅
* If you get a red error → check if the table already exists or if the SQL is compatible with your version

```sql
CREATE TABLE IF NOT EXISTS `service_fun` (
  `identifier` VARCHAR(60) NOT NULL,
  `name` VARCHAR(100) NOT NULL,
  `job_name` VARCHAR(50) NOT NULL,
  `job_label` VARCHAR(50) DEFAULT NULL,
  `grade` INT DEFAULT 0,
  `grade_label` VARCHAR(50) DEFAULT NULL,
  `on_duty` BOOLEAN DEFAULT FALSE,
  `start_time` DATETIME DEFAULT CURRENT_TIMESTAMP,
  `last_action` DATETIME DEFAULT NULL,
  PRIMARY KEY (`identifier`)
);
```
