Hi, I''m trying to use migrations to create a table with a string column that has a default value of null. Instead of a default of null, though, it''s using the four-character string "NULL". I found some similar bug reports (e.g., http://dev.rubyonrails.org/ticket/9469 http://dev.rubyonrails.org/ticket/9145 ), but that second one was closed with "cannot reproduce/works for me", so I must be doing something wrong??? This is what I''m doing. I tried this with gem rails 1.2.3 and edge rails 7416, and they both did the same thing. $ rails project ; cd project $ cat > config/database.yml development: adapter: sqlite3 database: db/project.development ^D $ mkdir db/migrate ; cat > db/migrate/001_initial_schema.rb class InitialSchema < ActiveRecord::Migration def self.up create_table :items do |t| t.column :name, :string # I also tried: # t.column :name, :string, :null => true, :default => nil end end end ^D $ cat > app/models/item.rb class Item < ActiveRecord::Base end ^D $ rake db:migrate $ script/console Loading development environment.>> x = Item.create=> #<Item id: 1, name: "NULL">>> x.name.length=> 4 ^D $ sqlite3 db/project.development sqlite> .schema items CREATE TABLE items ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT NULL); sqlite> insert into items values (69, null); sqlite> select * from items; 1|NULL 69| Thanks for you help, Steven --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---