Code & Deploy
Code
Code Review
Models
Repos
Toggle menu
Code
Code Review
Models
Repos
Sign in
Sign in
@setoelkahfi
/
tower-of-bazel
tower-of-bazel
/
backend
/
musik88-web
/
db
/
migrate
/
20220114222707_create_comments.rb
Code
Commits
Issues
Pulls
Sessions
CI/CD
feature/share-libs
feature/share-libs
main
rb
12 lines
265 Bytes
Copy permalink
Copy
Raw
1
class
CreateComments
<
ActiveRecord
::
Migration
[
6.1
]
2
def
change
3
create_table
:comments
do
|
t
|
4
t
.
text
:body
5
t
.
integer
:commentable_id
6
t
.
string
:commentable_type
7
t
.
references
:user
,
foreign_key:
true
8
9
t
.
timestamps
10
end
11
end
12
end