similar to: Problem with plurals, migrations?

Displaying 20 results from an estimated 2000 matches similar to: "Problem with plurals, migrations?"

2006 Jan 13
1
How to disconnect to a database????
Hi, We have experienced some problems with ActiveRecord::Base class of Ruby-Rails. We are building a web-application based on the Ruby-rails framework and the web-application needs to access to difference databases, so we do not pre-define our database accesses in the database.yml file. In fact, we are using the ActiveRecord::Base.establish_connection() to connect to our database, the function
2005 Apr 23
2
[Tip] Introspection to determine if a column may be null
I still want to get this into Rails for all connection adaptors, but for now I''ve hacked my own addition on for just PostgreSQL. The following code extends every Column object returned by MyModel.columns to support a new #required? method, which indicates if the column may or may not be null. The following is a huge hack - suggestions on a cleaner way to add this functionality
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
The build failed. CHANGES ------- Revision 8649 committed by gbuesing on 2008-01-16 20:07:10 Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing compatibility with Time. Closes #10002 M /trunk/activesupport/CHANGELOG M /trunk/activesupport/lib/active_support/core_ext/date_time/calculations.rb M /trunk/activesupport/test/core_ext/date_time_ext_test.rb TEST FAILURES AND
2006 Jan 18
1
Helps!!!!! Rails database connection guru needed!!!!!!!
Hi, I really need help to understand what is happening while Rails connect to a database, (we area actually using postgresql, so my example will be with postgresql) What I understand is Rails is able to connect to different DB. Actually, this is what we want, and we have made some tests, everything is juste fine. However, all these tests lead us to some important questions that we did find 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
2005 Dec 22
2
nonstandard postgresql sequence names
I''m working with a legacy postgresql database where the names of tables, columns, etc., do not usually follow Rails conventions. I''ve been able to work around it for the most part, but I ran into this: I have the following test: require File.dirname(__FILE__) + ''/../test_helper'' class SponsorTest < Test::Unit::TestCase self.use_transactional_fixtures =
2006 May 19
0
Migrations: The same class name form migration and model cause problems
I need to bootstrap my database when creating schema. My model class and migration class are the same. When I trying: ClassName.create :foo => ''bar'' in migration I got: undefined method `create'' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0xb75a357c> How to avoid this? I think the same class names causes problem, but I can''t change
2010 Jun 30
0
I have problem ....PostgreSQLAdapter::PGconn
I have a problem when i am creating a rails project using postgresql... uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn I have already installed gem postgres-pr. but not start.. I using rails version 2.3.5 Ruby 1.8.7 PostgresSQL 1.10.2. Please help me thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to
2006 Apr 25
0
Migrate default now()
I want to set default value to current time of database: class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| # ... t.column :created_at, :timestamp, :null => false, :default => ''now'' end end #... end On postgresql, it is converted to: created_at timestamp NOT NULL DEFAULT ''2006-04-25
2006 Nov 05
1
diag()<- in Matrix?
Dear all, I am trying to use the Matrix package to do some calculations on rather large and sparse matrices. An example of such a matrix is given below. mig<-0.2 side<-10 np<-side^2 mig.mat<-matrix(0,np,np) diag(mig.mat[1:(np-side),(side+1):np])<-mig/4 diag(mig.mat[(side+1):np,1:(np-side)])<-mig/4 diag(mig.mat[-np,-1])<-mig/4
2006 Jan 05
7
HOWTO: Combine fields from 2 two tables in 1 object
Hi all, For a dropdownlist (showing "Company - FirstName Lastname'') I want to fill an object @project_contacts with "Name" from table Companies and "Firstname" and "Lastname" from table contacts. Any idea? Regards, Gerard. -- "Who cares if it doesn''t do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS
2006 Mar 04
1
active migration gives undefined_method ''string_to_binary''
has anyone ever seen that: c:\rails\test>rake migrate --trace (in c:/rails/test) ** Invoke migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute migrate rake aborted! undefined method `string_to_binary'' for ActiveRecord::ConnectionAdapters::ColumnDefinition:Class
2020 Jul 21
0
[PATCH v3 2/5] mm/migrate: add a flags parameter to migrate_vma
The src_owner field in struct migrate_vma is being used for two purposes, it acts as a selection filter for which types of pages are to be migrated and it identifies device private pages owned by the caller. Split this into separate parameters so the src_owner field can be used just to identify device private pages owned by the caller of migrate_vma_setup(). Rename the src_owner field to
2020 Jul 23
0
[PATCH v4 2/6] mm/migrate: add a flags parameter to migrate_vma
The src_owner field in struct migrate_vma is being used for two purposes, it acts as a selection filter for which types of pages are to be migrated and it identifies device private pages owned by the caller. Split this into separate parameters so the src_owner field can be used just to identify device private pages owned by the caller of migrate_vma_setup(). Rename the src_owner field to
2020 Jul 20
0
[PATCH v2 2/5] mm/migrate: add a direction parameter to migrate_vma
On 7/20/20 11:36 AM, Jason Gunthorpe wrote: > On Mon, Jul 13, 2020 at 10:21:46AM -0700, Ralph Campbell wrote: >> The src_owner field in struct migrate_vma is being used for two purposes, >> it implies the direction of the migration and it identifies device private >> pages owned by the caller. Split this into separate parameters so the >> src_owner field can be used just
2020 Jul 20
2
[PATCH v2 2/5] mm/migrate: add a direction parameter to migrate_vma
On Mon, Jul 13, 2020 at 10:21:46AM -0700, Ralph Campbell wrote: > The src_owner field in struct migrate_vma is being used for two purposes, > it implies the direction of the migration and it identifies device private > pages owned by the caller. Split this into separate parameters so the > src_owner field can be used just to identify device private pages owned > by the caller of
2020 Mar 16
0
[PATCH 1/2] mm: handle multiple owners of device private pages in migrate_vma
Add a new opaque owner field to struct dev_pagemap, which will allow the hmm and migrate_vma code to identify who owns ZONE_DEVICE memory, and refuse to work on mappings not owned by the calling entity. Signed-off-by: Christoph Hellwig <hch at lst.de> --- arch/powerpc/kvm/book3s_hv_uvmem.c | 4 ++++ drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 +++ include/linux/memremap.h
2020 Jul 06
0
[PATCH 2/5] mm/migrate: add a direction parameter to migrate_vma
The src_owner field in struct migrate_vma is being used for two purposes, it implies the direction of the migration and it identifies device private pages owned by the caller. Split this into separate parameters so the src_owner field can be used just to identify device private pages owned by the caller of migrate_vma_setup(). Signed-off-by: Ralph Campbell <rcampbell at nvidia.com> ---
2009 Sep 28
5
Multi-databases support
Hi, While I was hacking ovirt-server, I have found that it's currently restricted to Postgres DB. Even if I like postgres for serious work on a server, I really prefer to hack/dev locally on a Sqlite or MySQL DB. I have googled on rails in order to find a good answer for the "foreign key problem" which forces OVirt to stay on pg. I have found a plugin on this particular
2020 Jul 13
0
[PATCH v2 2/5] mm/migrate: add a direction parameter to migrate_vma
The src_owner field in struct migrate_vma is being used for two purposes, it implies the direction of the migration and it identifies device private pages owned by the caller. Split this into separate parameters so the src_owner field can be used just to identify device private pages owned by the caller of migrate_vma_setup(). Signed-off-by: Ralph Campbell <rcampbell at nvidia.com>