You can manage your PostgreSQL database tables directly in the Hasura console.
Creating a table in the Hasura Console (recommended) does two things:
You can also create tables directly in PostgreSQL.
id
column.Frequently used columns are a quick way to add frequently used columns.
Creates a column called id
with an Integer
type. The column automatically increments for every row.
Example values: 1,2,3
.
Why use Integers?
Integers can be sorted based on when the row was created. They are also easier to remember and debug.
Same as id (integer) but can hold larger values.
Creates a column called id
with an UUID
type. The column automatically generates a new UUID for every row.
Example value: cc3d4bc2-39a8-4efc-9ef0-c71b899d113a
Why use UUID?
UUIDs does not leak information about the number of rows in your database. Using a UUID also means that one ID is unique across all databases in the world.
Automatically sets the row to the date of creation. The value will stay the same if a row is updated. The date is a timestamp with timezone data.
Example value: 2019-09-23T15:07:09.548632+00:00
Automatically sets the row to the date of creation. This will update to the current date every time a row is updated. The date is a timestamp with timezone data.
Example value: 2019-09-23T15:07:09.548632+00:00
The table you want to delete might have existing relationships tracked by Hasura. When you try to delete such a table you will be asked to extra confirmation to delete those relationships too.
If you create tables directly into PostgreSQL (not via the Hasura console) you must track those tables in the Hasura console. When you track a table the GraphQL API gets updated automatically to include the fields.