Create todos table

Now let's move on to creating the other model: todos

The todos table will have the following columns:

  • id (type Integer (auto-increment)),
  • title (type Text),
  • is_completed (type Boolean and default false)
  • is_public (type Boolean and default false)
  • created_at (type Timestamp and default now())
  • user_id (type Text)

The columns are associated with properties of todo items.

Remember to set the id column to the primary key.

In the Hasura Console, head over to the DATA tab section and click on Create Table. Enter the values for creating the table as mentioned above.

Create table users

Once you are done, click on Add Table button to create the table.


Get Started with GraphQL Now

Hasura Cloud gives you a fully managed, production ready GraphQL API as a service to help you build modern apps faster.
Ready to get started?
Start for free on Hasura Cloud or you could contact our sales team for a detailed walk-through on how Hasura may benefit your business.
Stay in the know
Sign up for full access to our community highlights, new features, and occasional baby animal gifs! Oh, and we have a strict no-spam rule. โœŒ๏ธ