> For the complete documentation index, see [llms.txt](https://ahero-fivem-shop.gitbook.io/ahero.fivem-shop-gtav/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ahero-fivem-shop.gitbook.io/ahero.fivem-shop-gtav/rageui-esx/avehinventory/installation/etape-3.md).

# Etape 3

Ajout du SQL

{% hint style="danger" %}
Veuillez ajouter le code SQL pour assurer le bon fonctionnement de la ressource.
{% endhint %}

Voici les tables SQL à ajouter dans votre base de données.

***

## Insert tables SQL

<details>

<summary>owned_vehicles.sql</summary>

```sql
-- SI VOTRE TABLE N'EST PAS CREE MERCI DE INSERT LA TABLE LIGNE 1 à 15
CREATE TABLE `owned_vehicles` (
  `vehicle` longtext NOT NULL,
  `owner` varchar(60) NOT NULL,
  `inv` text NOT NULL DEFAULT '{}',
  `state` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Etat de la voiture',
  `plate` varchar(50) NOT NULL,
  `type` varchar(10) NOT NULL DEFAULT 'car',
  `vip` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Voiture Boutique'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

ALTER TABLE `owned_vehicles`
  ADD PRIMARY KEY (`plate`),
  ADD KEY `vehsowned` (`owner`);
COMMIT;


-- SI VOUS AVEZ DEJA LA TABLE owned_vehicles DANS VOTRE BASE DE DONNER VOUS AVEZ JUSTE A AJOUTER CETTE LIGNE SQL DANS VOTRE TABLE owned_vehicles
ALTER TABLE `owned_vehicles`
  ADD `inv` text NOT NULL DEFAULT '{}'
;
```

</details>
