similar to: add_column not working in migration for sqlite3

Displaying 20 results from an estimated 9000 matches similar to: "add_column not working in migration for sqlite3"

2006 Jun 03
2
migrations unit test and sqlite3 add_column
Hi all, I submitted a patch the other day for an issue I ran into running an "add_column" migration on a sqlite3 database when there is existing data in the table, and the new column has ":null=>false". Details at http://dev.rubyonrails.org/ticket/5215. The issue I encountered was not picked due to the unit test not having any actual data in it before running the
2006 Oct 15
3
Migrations - add_column :default=>true, :null=>false
This seems pretty brain dead: add_column :types, :notify_on_create, :boolean, {:default=>true, :null=>false} $ rake migrate Error: ERROR: column "notify_on_create" contains null values : ALTER TABLE types ALTER notify_on_create SET NOT NULL Why doesn''t Rails set the new column to true, as it''s supposed to default to? I tried :default=>1 as well (same
2006 Jul 07
1
Add_column not working
I try to add a column using migration in the table tests with the name namn as a string. Doesn''t work. Any idea why? def self.up add_column :tests, :namn, :string end -- Posted via http://www.ruby-forum.com/.
2010 Sep 04
8
sqlite3/sqlite3_native (LoadError)
Hi, I have installed ruby 1.9.2, rubygems 1.3.7 and rails 3.0. created a demo application. when I start ''rails server'' I get: ''require'': no such file to load -- sqlite3/sqlite3_native (LoadError) any idea ? Thank you. Dani -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on
2006 Jul 18
3
DB Migrations & Column Order
Hello, I created a table and about 10 migrations down the line I decided that I needed to add an ID column (this was actually a table for a has_many :through and I recently realized that it needs an ID column, unlike HABTM tables). I am a big perfectionist and I frequently run "SHOW COLUMNS IN table;", so I naturally expect to see the "id" column the first one listed. However,
2011 Aug 07
2
PROBLEM WITH PAPERCLIP
hello, i am trying to upload a image file ...using paperclip in rails 3 i did as follows 1. In gemfile => included gem paperclip 2.In config/environments /development.rb => Paperclip.options[:command_path] = "/usr/bin/" (convert path) 3.created a controller *picusers *and defined => def create @picuser = Picuser.create(params[:picuser]) end 4.created a model *picuser
2006 Apr 02
5
adding primary_key to join table using migrations
Hi list, My tag_question_user join table is not currently a full-blown model. It doesn''t have a primary key - just tag_id, question_id, and user_id. I now want to add a primary key to this model (because I want to add a "description" column as well so users can describe the tag. I''m not sure how to add this using migrations. Here is what I have: class AddNotesToTags
2011 Apr 12
4
OS X - `require': no such file to load -- sqlite3/sqlite3_native
I''ve searched and search, tried a number of things like unstalling sqlite3 and reinstalling. Reinstalling Rails, building sqlite3 from source, etc. Nothing seems to work. When I try to start up my server I get the following: MacBook-Pro:splash Ross$ rails server /Volumes/Macintosh HD/Users/Ross/rails_projects/splash/json/ruby/1.9.1/gems/sqlite3-1.3.3/lib/sqlite3.rb:6:in
2010 May 15
2
sqlite3 module not found
Hi, I''m trying to follow the Rails tutorial found here, http://guides.rubyonrails.org/getting_started.html and when I go to run $ rake db:create I get this wonderful error of sqlite3.dll missing. So, I just went to my ruby directory, and ran $ gem install sqlite3-ruby sqlite3 I''m not entirely sure what to do. Any ideas? -- Posted via http://www.ruby-forum.com/. -- You
2007 Nov 29
1
Migration Bug?
Please tell me I''m just confused, but this is very strange. I have a migration like so: class AddLevelToRequest < ActiveRecord::Migration def self.up add_column :requests, :title_levels, :string end def self.down remove_column :requests, :title_levels end end Run the migration, and from the console do: >> r = Request.new => #<Request:0x31a243c
2011 Mar 18
6
Could not find sqlite3
I am trying to get Ruby/Rails running on my mac but having some issues. I created a new rails project "blog_test" trying to get something working. When I follow this guide http://guides.rubyonrails.org/getting_started.html it says to do a "db:create". This is where I get this error... Could not find gem ''sqlite3 (>= 0)'' in any of the gem sources listed
2009 Sep 03
12
paperclip is not saving the files
Hi all, I''ve installed paperclips but paperclip is not saving the files my model has has_attached_file :attachment,:styles => { :medium => "300x300>", :thumb => "100x100>" } and i have db migration as class AddAttachmentToPolicies < ActiveRecord::Migration def self.up add_column :policies,
2006 Nov 29
2
db:migrate to add colum bombs...
Hi I get the following when I try and run "rake db:migrate" (I"m running un Ubuntu linux) ********** code ********** (in /<home hidden>) == AddRpts: migrating ========================================================= -- add_column("rpts", :integer, {:limit=>3}) rake aborted! You have a nil object when you didn''t expect it! You might have expected an
2006 Aug 04
8
Demo in rails2.pdf of add_price migration, PostgreSQL 8.1.4
People, I''m looking at the migrate example on p 74 of the rails2.pdf It''s a simple example of using a migration to add a column to the products table. Here is a copy of the migration file named 002_add_price.rb after I generated and then edited it: class AddPrice < ActiveRecord::Migration def self.up add_column :products, :price, :decimal, :precision => 8, :scale
2008 Apr 12
12
sqlite3.dll problem
Hi I''m triying to begin developing in ruby on rails, and I''ve instaled all the components but there is a problem with the file sqlite3.dll. When I try to execute my first example in my web browser apears an alert that says sqlite3.dll is not found. I''m working on windows XP with firefox and the server is WEBrick. If someone knows how can I resolve the problem please
2010 Sep 08
6
Cannot start sqlite3
Hello everybody, i''m a long time watcher of these forums first time poster. I wanted to start getting into rails and have a play, I found a very useful guide on the Internet detailing the install process for Ubuntu 10.04, after the install and setup process which seem to complete OK, i went ahead and started my first project, however when I go to start the server I get this message?
2010 Feb 25
2
[PATCH] Enhance vms display
It can be quite hard to manage a pool of 40-50 VMs without informations about the OS running, the contact (which is the only one to know when the vm can really be destroyed) or an End Of Life date. This patch add those fields, and rework a little the VM list view, in order to show gracefully those new fields. It has been made at the expense of UUID, Total Run Time & Load fields. Since those
2006 Aug 02
2
Help please: AWDWR -- Migration failure
I''m having a problem with one of the migration files from the depot application. ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == AddPrice: migrating ======================================================== -- add_column(:products, :price, :decimal, {:scale=>2, :default=>0, :precision=> 8}) rake aborted! You
2008 Feb 13
4
Migration Issues: Can't update newly added column values
Hello everyone, just wondering if anyone can help me with a migrations question here. Using: rails 2.0.2 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin] mysql 5.0.45 Platform: windows xp The problem: ---------- I created a migration that is designed to add a column named "deleted_at" (timestamp) and then remove a column named "is_deleted" (boolean). The idea is to
2006 Apr 10
1
Add Column After Column in Migrations
Adding a column to a table just places the column at the end, but I like to keep related columns together. Is there a way to specify where the column is added in a table with migrations? For example, in MySQL you can do: ALTER TABLE my_table ADD COLUMN new_column INT AFTER other_column I was hoping migrations would support something like this: add_column :my_table, :new_column, :integer,