> For the complete documentation index, see [llms.txt](https://plexidev.gitbook.io/quickdb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plexidev.gitbook.io/quickdb/overview/migration-guide.md).

# Migration Guide

This guide will be quite short, I tried my best to make most of quick.db 9.0.0 backwards compatible with other versions

## Initialization

The way to initialize quick.db has been changed.

```javascript
// Quick.db before
const db = require('quick.db');

// Now
const { QuickDB } = require('quick.db');
const db = new QuickDB();
```

## Table

The table function now doesn't use the new keyword

```javascript
// Quick.db before
const table = new db.table("my_table");

// Now
const table = db.table("my_table");
```

## Subtract

This is the only method that changed.\
It has been renamed to `sub` to keep the naming convention of the `add` method

```javascript
// Quick.db before
await db.subtract("mykey", 10);

// Now
await db.sub("mykey", 10);
```

## Async/Await

Now quick.db uses async and await for all of it's method

```javascript
// Quick.db before
db.add("mykey", 10);

// Now
await db.add("mykey", 10);
```
