创建用户表
让我们先创建users
表。
users
表将包含以下列:
id
(输入文本)、name
(输入文本)、created_at
(输入时间戳和默认值 now())last_seen
(输入时间戳和可空值)
这些列与用户的属性关联。 last_seen
列可用来存储用户在线时的最新时间戳。
在 Hasura 控制台中,转到DATA
选项卡部分,然后单击我们之前连接的 Heroku 数据库(在左侧导航栏)。 数据库名称是default
,模式名称是public
。在登录public
模式后,单击Create Table
。输入用于创建上述表的值。
完成后,请单击Add Table
按钮,以创建表。
太好了! 你已创建该应用程序所需的第一个表。
Did you find this page helpful?
Start with GraphQL on Hasura for Free
Build apps and APIs 10x faster
Built-in authorization and caching
8x more performant than hand-rolled APIs

