Skip to content

Commit ba8e095

Browse files
author
Juho H
committed
merge
2 parents 8321726 + 4505541 commit ba8e095

File tree

8 files changed

+51
-0
lines changed

8 files changed

+51
-0
lines changed

app/models/comment.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class Comment < ActiveRecord::Base
2+
end

app/models/link.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class Link < ActiveRecord::Base
2+
end

app/models/section.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class Section < ActiveRecord::Base
2+
end

app/models/user.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class User < ActiveRecord::Base
2+
end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class CreateComments < ActiveRecord::Migration
2+
def change
3+
create_table :comments do |t|
4+
t.string :comment
5+
t.integer :score
6+
t.integer :user_id
7+
t.integer :link_id
8+
9+
t.timestamps null: false
10+
end
11+
end
12+
end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class CreateLinks < ActiveRecord::Migration
2+
def change
3+
create_table :links do |t|
4+
t.string :link
5+
t.integer :score
6+
t.integer :section_id
7+
t.integer :user_id
8+
9+
t.timestamps null: false
10+
end
11+
end
12+
end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class CreateUsers < ActiveRecord::Migration
2+
def change
3+
create_table :users do |t|
4+
t.string :password_digest
5+
t.string :username
6+
7+
t.timestamps null: false
8+
end
9+
end
10+
end
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class CreateSections < ActiveRecord::Migration
2+
def change
3+
create_table :sections do |t|
4+
t.string :name
5+
6+
t.timestamps null: false
7+
end
8+
end
9+
end

0 commit comments

Comments
 (0)