26 Jul '16, 1pm

Adding Columns to a Database Table in Rails with a Migration:

Adding Columns to a Database Table in Rails with a Migration:

In this lesson, we are going to talk about database manipulation and database migrations so you can become familiar with how to add columns to a database in a Rails app. To start, let's add a column to the database by running a migration generator in the console: rails g migration add_stage_to_projects stage:integer Running this command will create a new migration file for us with the code preloaded for adding a new column to the projects table. Now, let's open the 20151030004750_add_stage_to_projects.rb file. This file adds a column to the project table with the command: def change add_column :projects , :stage , :integer end This line means we are adding a column called stage to the projects table, and this new column is of the integer data type. Now, go back to the console and run the migration with the command: rake db:migrate You can check if the table is updated by g...

Full article: https://rails.devcamp.com/learn-ruby-on-rails-from-scratc...

Tweets

Here is my 'Aila!.. Caching in Rails' talk's sl...

goo.gl 06 Aug '16, 12pm

https://goo.gl/e40Tk – this goo.gl shortlink has been disabled. It was found to be violating our Terms of Service. Click h...

Getting the Most out of your Database with Ruby...

blog.cloud66.com 19 Jul '16, 4pm

From the time a new Rails app is started, database migrations become important. Migrations help developers setup the datab...

On the value of adding multiple #running speed/paces to your next #workout

On the value of adding multiple #running speed/...

runningmagazine.ca 27 Jul '16, 7pm

A majority of workouts aim at specifically targeting one energy system while practicing running at a particular pace, ofte...

EU wants to create a database of Bitcoin users - BetaNews

EU wants to create a database of Bitcoin users ...

betanews.com 29 Jul '16, 8am

The end of anonymity for Bitcoin users may be fast approaching as the EU has put forth a proposal that would require anyon...

Why Learn Ruby On Rails?

Why Learn Ruby On Rails?

manchesterdigital.com 26 Jul '16, 8am

Airbnb , Basecamp , Disney , GitHub , Hulu , Kickstarter , Shopify , Twitter , and the Yellow Pages . There’s also a healt...

[Programming & DevOps] Getting the Most out of ...

dzone.com 20 Jul '16, 12pm

: Database clients must select a strategy on how they want to retrieve and lock data. The default for Rails is optimistic ...

Rails Jailed Console

rubyflow.com 01 Aug '16, 10pm

× The Ruby and Rails community linklog Made a library? Written a blog post? Found a useful tutorial? Share it with the Rub...