generated from microverseinc/readme-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbcommands.txt
19 lines (15 loc) · 2.06 KB
/
dbcommands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Comment.create(post_id: 1, user_id: 1, text: 'first comment on post 1!' ).update_comments_counter()
Comment.create(post_id: 1, user_id: 1, text: 'second comment on post 1!' ).update_comments_counter()
Comment.create(post_id: 2, user_id: 2, text: 'first comment on post 2!' ).update_comments_counter()
Comment.create(post_id: 2, user_id: 2, text: 'second comment on post 2!' ).update_comments_counter()
Comment.create(post_id: 1, user_id: 2, text: 'second comment on post 1!' ).update_comments_counter()
Comment.create(post_id: 2, user_id: 1, text: 'first comment on post 2!' ).update_comments_counter()
Comment.create(post_id: 1, user_id: 2, text: 'second comment on post 2!' ).update_comments_counter()
Post.create(author_id: 1, title: 'Hello', text: 'This is my new post').update_post_counter()
Post.create(author_id: 1, title: 'Hello', text: 'This is my other post').update_post_counter()
Post.create(author_id: 2, title: 'Hello', text: 'This is my very second post').update_post_counter()
Post.create(author_id: 2, title: 'Hello', text: 'This is my very third post').update_post_counter()
User.create(name: 'kelly', photo: 'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80', bio: 'Teacher from Mexico.').save()
User.create(name: 'Louis', photo: 'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80', bio: 'Teacher from Mexico.').save()
User.create(name: 'Favor', photo: 'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80', bio: 'Teacher from Mexico.').save()
User.create(name: 'Tommy', photo: 'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80', bio: 'Teacher from Mexico.').save()