Last active
December 16, 2015 19:39
-
-
Save beverlynelson/5486386 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddTitleToPosts < ActiveRecord::Migration | |
def change | |
add_column :posts, :title, :string | |
add_column :posts, :image, :string | |
add_column :posts, :link, :string | |
add_column :posts, :documentation, :text | |
end | |
#NOTE: there's another way to write ^ a little more streamlined | |
#For now do this for clarity | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreatePosts < ActiveRecord::Migration | |
def change | |
create_table :posts do |t| | |
t.string :title | |
t.string :image | |
t.string :link | |
t.text :documentation | |
t.timestamps | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So this is a base to work with. You can always add things later but that at least gets you started