Your task
1. In a tab named 001_users_and_posts.sql, create these two tables.
users
| Column | Type | Notes |
|---|---|---|
| id | serial | primary key |
| username | text | |
| text | ||
| bio | text | |
| created_at | timestamp | when they signed up |
posts
| Column | Type | Notes |
|---|---|---|
| id | serial | primary key |
| user_id | integer | the author's users.id |
| title | text | |
| body | text | |
| published | boolean | false while it's a draft |
| created_at | timestamp |
2. Product asks for an "edited" label on posts. In a new tab, 002_posts_updated_at.sql, add an updated_at timestamp column to posts.
3. Check your tabs are saved. The workbench writes every tab to data/migrations/sql/ (the header says Saved to …). You'll run them against a real database in Level 4.