# Installation Guide

## Step 1: SQL Modifications

You must execute the SQL code to set up the necessary database tables.

#### **Instructions**

1. Open your database management tool (e.g., phpMyAdmin or HeidiSQL).
2. Select Your Database.
3. Run the following SQL query in your database to create the required table:

```sql
CREATE TABLE `moon_interview` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`job` VARCHAR(255) NOT NULL COLLATE 'utf8mb3_general_ci',
	`clearanceGrades` LONGTEXT NOT NULL COLLATE 'utf8mb4_bin',
	`available24hours` TINYINT(1) NOT NULL,
	`questions` LONGTEXT NOT NULL COLLATE 'utf8mb4_bin',
	`pauseapplications` TINYINT(1) NOT NULL,
	`applicationtimings` LONGTEXT NOT NULL COLLATE 'utf8mb4_bin',
	`webhook` LONGTEXT NOT NULL COLLATE 'utf8mb4_bin',
	`updated_at` TIMESTAMP NULL DEFAULT NULL,
	PRIMARY KEY (`id`) USING BTREE,
	CONSTRAINT `questions` CHECK (json_valid(`questions`)),
	CONSTRAINT `applicationtimings` CHECK (json_valid(`applicationtimings`))
)
COLLATE='utf8mb3_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=6
;

CREATE TABLE `interview_responses` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`citizenid` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`department` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`answers` LONGTEXT NOT NULL COLLATE 'utf8mb4_general_ci',
	`additional_info` LONGTEXT NULL DEFAULT '[]' COLLATE 'utf8mb4_general_ci',
	`submitted_at` DATETIME NULL DEFAULT current_timestamp(),
	`status` LONGTEXT NULL DEFAULT '[{"type": 0, "reason": "We are looking into your application"}]' COLLATE 'utf8mb4_general_ci',
	`comments` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`id`) USING BTREE,
	UNIQUE INDEX `citizenid_department` (`citizenid`, `department`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=46
;

```

***

## **Step 2:** Configure the `Config.lua` File

Customize the `Config.lua` file based on your preferences and requirements. Ensure the settings align with your server's intended functionality and features.


---

# Agent Instructions: 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:

```
GET https://moon-store.gitbook.io/docs/job-interviews-and-better-hiring/installation-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
