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 83723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:49:07+00:00 2026-05-10T21:49:07+00:00

In Rails Migrations, what does the number specified for the :limit parameter on an

  • 0

In Rails Migrations, what does the number specified for the :limit parameter on an integer represent? Is it the number of bytes or the number of digits?

i.e. If I were to specify the following:

t.integer :coefficient, :limit => 2 

Does that mean the SQL database will reserve two bytes for each integer, or that each integer can not have more than two digits? I’m assuming it means bytes, but I’m not positive.

Thanks!

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-10T21:49:08+00:00Added an answer on May 10, 2026 at 9:49 pm

    According to the documentation, it’s the number of characters for :string and :text columns and the number of bytes for :binary and :integer columns.

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

Sidebar

Related Questions

Now that Rails has timestamped migrations , the single version number at the top
I have a sequence of migrations in a rails app which includes the following
I have the following rails migration: create_table :articles do |t| t.integer :user_id, :allow_null =>
In migrations we can write in following way t.integer :escalated_by, escalated_to, query_id But I
How does one create a Rails migration properly so that a table gets changed
Rails uses the concept of migrations to deal with model changes using the ActiveRecord
Rails has no way of creating foreign keys in migrations (there are plugins to
I use both ruby on rails and Java. I really enjoy using migrations when
I am working on a non Rails web app, so no migrations script by
I'm working on a Rails web application with a MySQL database. I'm using migrations

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.