Column | Type | Options |
---|---|---|
name | string | null: false |
image | string | |
bio | text | |
string | null: false, unique: true | |
team | references | null: false, foreign_key: true |
- add_index: :users, :name
- belongs_to :team
- has_many :posts
Column | Type | Options |
---|---|---|
name | string | null: false |
- add_index: :teams, :name
- has_many :users
Column | Type | Options |
---|---|---|
text | text | null: false |
image | string | null: true |
user | references | null: false, foreign_key: true |
- belongs_to :user