Open kevinwatson opened 4 years ago
Sample migration:
class CreateMyTable < ActiveRecord::Migration
def change
create_table :my_table, :id => :bigserial do |t|
t.text :text
t.string :string
t.integer :integer
t.integer :bigserial, limit: 8
t.float :float
t.decimal :decimal
t.datetime :datetime
t.timestamp :timestamp
t.time :time
t.date :date
t.binary :bytea
t.boolean :boolean
t.bigint :bigint
end
end
Before (note the missing limits on the varchar
fields):
CREATE TABLE my_table (id integer, text varchar, string varchar, integer integer, bigserial integer, float float, decimal decimal, datetime datetime, timestamp datetime, time time, date date, bytea bytea, boolean boolean, bigint bigint)
After:
CREATE TABLE my_table (id integer, text varchar(15000), string varchar(255), integer integer, bigserial integer, float float, decimal decimal, datetime datetime, timestamp datetime, time time, date date, bytea bytea, boolean boolean, bigint bigint)
Edit: Added the bigint
type and renamed some of the columns
Passing CircleCI tests (under my own account)
I believe this PR is ready for review, @film42 and @mrdeadsake
Maybe make a pre-release version to put out so we can test it?
Otherwise it looks like it's working
We're seeing
varchar(80)
field sizes in Vertica for fields defined as eitherstring
ortext
. Calling the parent method should fix this issue. We should also ignore the limits set in a migration forinteger
types.