Skip to content

Commit de04342

Browse files
committed
add docs for if_not_exists for create_table
1 parent 32000cc commit de04342

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/src/piccolo/query_types/create_table.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ This creates the table and columns in the database.
1111
1212
>>> Band.create_table().run_sync()
1313
[]
14+
15+
16+
To prevent an error from being raised if the table already exists:
17+
18+
.. code-block:: python
19+
20+
>>> Band.create_table(if_not_exists=True).run_sync()
21+
[]

0 commit comments

Comments
 (0)