- types[:bigint] = { :name => "bigint", :limit => 20 }
- types[:double] = { :name => "double" }
- types[:bigint_pk] = { :name => "bigint(20) DEFAULT NULL auto_increment PRIMARY KEY" }
- types[:bigint_pk_64] = { :name => "bigint(64) DEFAULT NULL auto_increment PRIMARY KEY" }
- types[:bigint_auto_64] = { :name => "bigint(64) DEFAULT NULL auto_increment" }
- types[:bigint_auto_11] = { :name => "bigint(11) DEFAULT NULL auto_increment" }
- types[:bigint_auto_20] = { :name => "bigint(20) DEFAULT NULL auto_increment" }
- types[:four_byte_unsigned] = { :name=> "integer unsigned NOT NULL" }
- types
- end
-
- def change_column(table_name, column_name, type, options = {})
- unless options_include_default?(options)
- options[:default] = select_one("SHOW COLUMNS FROM #{table_name} LIKE '#{column_name}'")["Default"]
+ types[:double] = { :name => "double precision" }
+ types[:integer_pk] = { :name => "serial PRIMARY KEY" }
+ types[:bigint_pk] = { :name => "bigserial PRIMARY KEY" }
+ types[:bigint_pk_64] = { :name => "bigserial PRIMARY KEY" }
+ types[:bigint_auto_64] = { :name => "bigint" } #fixme: need autoincrement?
+ types[:bigint_auto_11] = { :name => "bigint" } #fixme: need autoincrement?
+ types[:bigint_auto_20] = { :name => "bigint" } #fixme: need autoincrement?
+ types[:four_byte_unsigned] = { :name => "bigint" } # meh
+ types[:inet] = { :name=> "inet" }