Create users table
Let's get started by creating the
users table will have the following columns:
created_at(type Timestamp and default now())
last_seen(type Timestamp and nullable)
The columns are associated with properties of users. The
last_seen column is used to store the latest timestamp of when the user was online.
In the Hasura Console, head over to the
DATA tab section and click on the Heroku database (from the left side navigation) that we connected earlier. The database name would be
default and the schema name would be
public. Once you land on the
public schema, click on
Create Table. Enter the values for creating the table as mentioned above.
Once you are done, click on
Add Table button to create the table.
Great! You have created the first table required for the app.