Sign up for Hasura Newsletter
Loading...

ユーザーテーブルを作成する

users テーブルを作成することから始めましょう。

users テーブルには、以下の列が表示されます。

  • id(type Text)、
  • name(type Text)、
  • created_at(type Timestamp and default now())
  • last_seen(type Timestamp and nullable)

これらの列は、ユーザー項目のプロパティと関連付けられています。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
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin