> For the complete documentation index, see [llms.txt](https://nextscripts.gitbook.io/nextscripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nextscripts.gitbook.io/nextscripts/esx-scripts/garage-system/sql.md).

# SQL

```sql
DROP TABLE IF EXISTS `owned_vehicles`;

CREATE TABLE `owned_vehicles` (
  `owner` varchar(60) DEFAULT NULL,
  `plate` varchar(12) NOT NULL,
  `vehicle` longtext DEFAULT NULL,
  `extraData` longtext NOT NULL DEFAULT '{}',
  `impoundData` longtext DEFAULT NULL,
  `type` varchar(20) NOT NULL DEFAULT 'car',
  `job` varchar(20) DEFAULT 'civ',
  `name` varchar(60) NOT NULL DEFAULT 'Unknown',
  `garage` varchar(50) NOT NULL DEFAULT 'all',
  `stored` tinyint(1) NOT NULL DEFAULT 0,
  `isFavorite` tinyint(1) NOT NULL DEFAULT 0,
  `glovebox` longtext DEFAULT NULL,
  `trunk` longtext DEFAULT NULL,
  `lastUpdate` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

**Important**

if you have an Scripts with added own fields you need to add these after your import or reimport it.
