Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7594337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:23:28+00:00 2026-05-30T21:23:28+00:00

Hi I just created a database in RoR. I now want to add 10

  • 0

Hi I just created a database in RoR. I now want to add 10 more columns to it. However, I dont want to use the following type of command that adds only 1 column at a time:

rails generate migration AddClosing_Hrs1ToBusinesses closing_hrs1:string

Is there a way to add multiple columns to my database without having to type a command for each column individually like above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:23:29+00:00Added an answer on May 30, 2026 at 9:23 pm

    You can specify your column names all in one go

    rails generate migration AddClosing_Hrs1ToBusinesses closing_hrs1:string new_cloumn:string third_column:string
    

    Documentation : http://guides.rubyonrails.org/migrations.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just created an empty database on my machine. I now wish to copy
I have created a PostgreSQL database dump using psql . Now I want to
I just created a PHP page that spits outs some data from my database
I was just looking at the MySql database created by drupal after I installed
Recently I created a database with a name test_test in phpMyAdmin and just after
I have a blank MySQL database that I've just created. south is in my
I want to select a MySQL database to use after a PHP PDO object
I have just created a database secured with a symmetric key. The question is,
I just not created a new database with 2 tables in it. In a
I've created a small application to learn RoR. (Book database) It consists of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.