similar to: DB Migrations & Column Order

Displaying 20 results from an estimated 4000 matches similar to: "DB Migrations & Column Order"

2006 Jul 19
6
Howto: Check_box with a variable (no model)
Hi, I would like to put a checkbox on a form where the input field is a variable rather than a field in a model. The normal way (with a model) would be: <%= check_box(''client'', ''accept'', {}, "1", "0") %> But since accept is a variable @accept and model client will not be there, how do I make a check box work? Regards, Paul
2006 Jul 18
5
Right-click popup menu?
Hi, I have a partial frame on the side of a page which shows the current users logged in (as text). Now, I would like to be able to right-click on each user''s name, and get a menu containing links such as "View Profile", "Send Message", etc. These links could open in a new window. Is this possible? Any help would be greatly appreciated. Thanks, Aditya Rajgarhia
2006 Jul 21
20
Struts vs RoR
hi, I recently attended one of the ruby meetings that we have in my city. There one of the speaker said that google,amazon .. are working on RoR but still the performance of RoR is not at par with J2EE others.... he meant that though google,amazon working o it they will not bring it as front applications only parts the reason ruby is slow in comparison to other languages.... and in real time
2006 Jul 20
2
ROR dev on Different Ruby versions
Hi, First I would like to ask if someone could give me the direct link to the mailing list this forum mirrors. This is so I can do searches directly and not bother folks with repeat questions. Now my question: I recently installed a ROR app built on Ruby 1.8.2 and moved it to ROR on Ruby 1.8.4. I got a few errors and had to regenerate my app in the later and copy the App files and a few
2006 Jul 21
4
max upload file size
Can any one tell me if Rails has a max file size upload limit? and if so what is it and can I change it? Cheers. -- Posted via http://www.ruby-forum.com/.
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
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 23
3
help jedit
Hi, i was hoping (maliciously enough) if someone has also bumped into this problem. apologies in advance; this isn''t a rails/ruby question, but as i am a newbie developing in RoR and switching to Linux correspondingly, i was referenced to use Jedit as the prefferable editor for rails/ruby. but i have been having some trouble installing it - - i was wondering if anyone had bumped
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,
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 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 Jan 14
11
accessing models from migrations
Ok, so now Users need to be associated with Organizations. I''ve created a migration and added a ''organization_id'' column to the users table. I want the default organization_id to be the first Organization. So I have :default => Organization.find(:first). But it''s complaining about not being able to find the constant ''Organization''. Any
2006 Jan 17
4
find_by_sql column ordering defect?
Hello. I have a program that accesses a metadata (translation) table for column names as well as the ordering of columns for a specific model. Also in there is a collection of bool options such as column_visible_on_form, column_visible_on_screen_quicklist etc. The idea is that our customer can specify to a certain extent how their layout/user interface will appear. To accomplish this, I use
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 May 16
5
rake aborted when adding a column
I''m having a silly little problem with migrations.  All I''m trying to do is to add an SSN column to my Employees table.  I generated a migration which looks like: class AddSsn &lt; ActiveRecord::Migration def self.up     add_column :employees, :ssn, :string end def self.down     remove_column :employees, :ssn   end end When I run this, however, I get: &gt;rake
2006 Jan 05
1
Looping through all models in the application
Hello. I have an application that depends on a table/model (ModelInternationalization) that provides international translations in various languages for all the model/table and columns names as well as some other stuff (whether the column is visible on forms, dropdowns, lists, reports etc). I need to create a management interface for this translation stuff (the plaintext stuff, btw, will be
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
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