Project

General

Profile

Actions

Refactor #14025

closed

Specify string column limits

Added by David Davis about 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Branch:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

In Rails 4.2 the default limit for PostgreSQL and SQLite adapters
changes to unlimited from 255 characters. MySQL remains at 255 chars.
Existing migrations should be changed to specify the length, e.g.

t.column :name, :string, :null => false, :limit => 255

This will ensure that the schema generated on a new installation exactly
matches the schema from an old installation, so there won't be varying
versions of the schema in the wild.


Related issues 1 (0 open1 closed)

Related to Foreman - Refactor #13897: Explicitly set :limit on all DB migrations adding string columnsClosedDominic Cleal02/25/2016Actions
Actions

Also available in: Atom PDF