Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ of the `lapis.db.schema` module.

### Creating and Dropping Tables

#### `create_table(table_name, { table_declarations... })`
#### `create_table(table_name, { table_declarations... }, opt)`

The first argument to `create_table` is the name of the table and the second
argument is an array table that describes the table.
Expand All @@ -880,7 +880,7 @@ schema.create_table("users", {
{"username", types.varchar},

"PRIMARY KEY (id)"
})
}, { if_not_exists = true} )
```

```moon
Expand All @@ -893,7 +893,7 @@ create_table "users", {
{"username", types.varchar}

"PRIMARY KEY (id)"
}
}, {if_not_exists: true}
```

> In MySQL you should use `types.id` to get an autoincrementing primary key ID.
Expand Down