Displaying 20 results from an estimated 4000 matches similar to: "Rather sticky migrate problem"
2006 Feb 07
7
What happens to manuals.rubyonrails.com?
Hi guys,
does anyone know what happened to the manuals site? I have not been
able to connect to http://manuals.rubyonrails.com for two days (I
started reading all about RoR yesterday and finished most of the
tutorials i could gather, and really enjoyed playing with the rails).
TIA!
-xiheng
--
Posted with http://DevLists.com. Sign up and save your time!
2006 Sep 05
0
rake craziness with Migrate as a dependency
Hi everyone,
For one of our projects we have a need to deploy and maintain a demo.
As a result I''ve attempted to setup a set of rake tasks for the job.
My goal is have one rake task called "deploy_demo" which purges the
database, migrates to the current schema, and loads the db from a set
of fixture files in a specified location.
I''ve written two new tasks the perform
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 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
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
2006 Aug 09
1
Migrating a Field to External Model
I have a model Product with an attribute ''brand''. Currently it is a
simple attribute, however, I am migrating it to a separate model
Brand so that I can have other attributes with each brand. I created
the the model and created and ran the migration to create the new
table. So far so good. Then I created a separate migration to
transfer the data. The up method
2011 Apr 01
4
add_column not working in migration for sqlite3
Hello,
I developed an app with postgres DB but want to change the DB to
sqlite3. I changed the database adapter in the database.yml file. When I
run the migration most of it was successful but add_column was throwing
an error
"Cannot add a NOT NULL column with default value NULL: ALTER TABLE
"rates" ADD "customer_id" integer NOT NULL".
I made the modification and
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 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
2006 May 23
3
Dragging a copy of an image and then reverting
I''d like to drag images onto drop zones. I have a working demo with one
problem: the image leaves the dock and then "snaps back" to it:
(broken -- image leaves dock during drag then snaps back)
http://u32.net/junq/imlib-demo-1/
I can get the image to remain in the dock during the drag using
''ghosting:true''. But how do I keep the original in the dock
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
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 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 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
2005 Dec 15
4
rake migrate ignores '':null => false'' on mysql
I wanted to add a login string column to an existing table
=> I created a migration :
...
def self.up
add_column "members", "login" , :string, :null => false
end
...
remark: it shouldn''t work, as the table is not empty (=> ''login'' would
be null in the existing rows.)
problem:
rake migrate didn''t complain
2006 Nov 16
4
rake db:migrate problem
I am just starting out learning RoR. I am trying to follow along with
the Depot project in "Agile Web Development With Rails ed2" and get the
error "You have a nil object when you didn''t expect it! You might have
expected an instance of Array. The error occured while evaluating
nil.[]" I ran --trace and get the following, but I am not sure what it
means. Can
2006 May 26
7
migration with required data
I''m working on a bugtracker application in rails. I have a Bug model
and I want to add a Priority to the mix. A Bug can have one priority.
I generate a Priority model, modify my Bug model with a belongs_to
:priority and create my migration like so:
class CreatePriorities < ActiveRecord::Migration
def self.up
create_table :priorities do |t|
t.column :name, :string,
2006 Aug 16
6
Newbie-Question
Hi.
I''ve just started using Ruby on Rails.
Now I''ve got my first problem.
I generated a new migration ''add_price'' and get the message: