Now we’ll create the database table for our posts application. Since Supabase handles user authentication automatically, we only need to create a table for our application data.
Creating the Posts Table
In the Supabase menu, select Database.
- Click “Create a new table”.
- Table name:
posts. - Leave Enable Row Level Security (RLS) checked.
- Add columns (Add column button):
id: int8, primary key (auto-created).created_at: timestamptz, default now() (auto-created).title: text, not null.content: text, not null.user_id: uuid, auth.uid() (select this from the Suggested expressions menu button).
- Save the table.