similar to: Migrations & Postgres: Change column not functional?

Displaying 20 results from an estimated 10000 matches similar to: "Migrations & Postgres: Change column not functional?"

2006 Jul 01
1
Changing column to NOT NULL with migration silently failing.
Hi I''ve created a migration called make_customer_type_id_not_null_for_customers. The migration .rb file looks like this: class MakeCustomerTypeIdNotNullForCustomers < ActiveRecord::Migration def self.up change_column(:customers, :customer_type_id, :integer, { :null => false }) end def self.down change_column(:customers, :customer_type_id, :integer, { :null =>
2007 Feb 03
1
Postgres + tsearch2, migrations, and unit testing
I''m sure people have encountered this before, but I''ve been unsuccessful at finding anything about it. Basically, I got a rails app that uses postgres and tsearch2 for some full text indexing and I''d like to be performing unit tests. Now, there''s the whole deal of how to get the test database to load all the tsearch2 information properly. I tried to come up
2008 Nov 25
1
migration error, mysql, change column limit
Hmm, one of my migrations have stopped working on #down. It still works on #up. (It''s also possible that I never tested it for #down before, and it never worked, heh.) I can''t figure out why not. Pretty simple. class WidenRequestParams < ActiveRecord::Migration def self.up change_column :requests, :params, :string, :limit => 2048 end def self.down
2006 May 25
0
Quoting column names, postgres and legacy databases
Hi I''m building a Rails app that intereacts with several legacy databases, all on Postgres 7.4 and running into a few quirky problems. I seem to have a lot of inconsistencies w/ quoting field names in Postgres. I''ve written another app from scratch using Postgres and encountered quoting trouble there too. But it seemed tied to the machine I was serving the app from.
2007 Jun 07
0
How to use Postgres schemas in Rails app to separate data
Rails/Postgres Gurus, Question: Is it possible to use Postgres schemas within a Rails app to separate tables and data between two different apps? Problem Set: I am thinking of combining two apps. I want to share some data (certain tables) between them, but I want the migrations and other activities to be separated. I don''t want any table changes in one app to impact the other.
2012 Oct 05
2
heroku rake db:drop error PG::Error: FATAL: permission denied for database "postgres"
How to empty DB in heroku<http://stackoverflow.com/questions/4820549/how-to-empty-db-in-heroku> I have a Postgres database on Heroku. It is one of the free beta ones. Locally, when testing, I often run rake db:drop && rake db:create && rake db:migrate as a way to reset the database. However, when I try to run this on Heroku, I get the error:\[code\]Couldn''t drop
2006 Jul 14
3
postgres migration notices
When I run "rake" using a postgres 8.1 database, I get a bunch of these notices. NOTICE: CREATE TABLE will create implicit sequence "categories_id_seq" for serial column "categories.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "categories_pkey" for table "categories" How can I avoid those? I take it I need to modify the
2012 Oct 07
3
Option for inserts/updates/deletes on the Postgres adapter to return all columns, not just the id
By default with Rails, Postgres will return the id of a newly inserted record using returning "id". Sometimes when working with Postgres, tables will have triggers on them that modify the row''s data while being saved. As such, it would be great to also provide an option for Postgres to also let insert/updates and deletes to use returning * (which will return the row as it
2005 Oct 29
0
postgres 8.0, PQsetdbLogin() in -lpq... no
People, I got rails talking to PostgreSQL 8.0 on my Mac! Once upon a time: I''m on a Mac. I want to use postqreSQL 8.0 to backend my rails. I tried a gem install... zmac11:/cd/rubythings/ruby-postgres oracle$ zmac11:/cd/rubythings/ruby-postgres oracle$ zmac11:/cd/rubythings/ruby-postgres oracle$ zmac11:/cd/rubythings/ruby-postgres oracle$ gem install postgres ERROR: While executing
2007 Mar 05
2
SOLVED:Re: How to select postgres for usage instead postgres-pr?
Figured it out chaps..not to worry!!! -- Regards Andrew On 05/03/07, Andrew Madu <andrewmadu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > further to my additional email the gem build for postgres did not work, so > I downloaded and copied postgres.so into: > > C:\pgRails\lib\ruby\site_ruby\1.8\i386-msvcrt > > Again, how do I point rails to using this
2006 Apr 20
1
Unable to connect to postgres on Fedora Core 5
I have been struggling for hours trying to connect Rails to postgresql. I have trawled google results - all to no avail! I have installed the postgres gem but it doesn''t appear to install properly: # gem install postgres Attempting local installation of ''postgres'' Local gem file not found: postgres*.gem Attempting remote installation of ''postgres''
2009 Jul 06
1
[PATCH server] add ipv6 postgres trust
If management server has ipv6 enabled and postgres is not configured to allow localhost access via ::1 the postgres service will fail. --- installer/modules/ovirt/manifests/postgres.pp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/installer/modules/ovirt/manifests/postgres.pp b/installer/modules/ovirt/manifests/postgres.pp index 36bcdc0..12b7764 100644 ---
2006 Mar 27
5
Fixtures, Postgres & Constraints
Anyone have any tips for handling postgres constraints when using fixtures to load the database, other than to sort out the proper insertion orders or leaving the constraints out? I''d prefer not to do the former since I''d rather use my app to generate my fixture data (using a dump_fixtures task) and I''d prefer not to do the latter because leaving out constraints till the
2006 Jan 20
3
postgres db setup
All of the tutorials and the Agile book use MySQL and I''ve got that working. I am now trying to use PostgreSQL and can''t seem to get going. Is my problem the db setup in postgresql? I have installed postgres-pr The error message when I try to access http://localhost:3000/clients when using PostgreSQL (MySQL works fine) ActiveRecord::StatementInvalid (RuntimeError: ERROR
2006 Jul 31
3
PostgreSQL, postgres gem, rails2.pdf, http://ruby.scripting.ca/postgres/ confusion...
Hello people... In the rails2.pdf Dave T says: Rails works with the DB2, MySQL, Oracle, Postgres,... The database drivers are all written in C and are primarily distributed in source form. Then he lists this site: http://ruby.scripting.ca/postgres/ Then he says, There is a pure-Ruby version of the Postgres adapter available. Download postgres-pr from the Ruby-DBI page at
2009 Feb 07
2
installing ruby-postgres gem
I''m starting to look at postgres because I''m going to need it for its GIS extensions. But I run in into a problem when trying to install the ruby-postgres gem. I get this error Building native extensions. This could take a while... ERROR: Error installing ruby-postgres: ERROR: Failed to build gem native extension. blah blah blah etc postgres.c:31: error: conflicting types
2009 Jun 23
1
[PATCH server] add postgres permissions requires prior to starting service
Give this one a try which will require the user/hosts permissions to be setup prior to starting postgres --- installer/modules/ovirt/manifests/postgres.pp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/installer/modules/ovirt/manifests/postgres.pp b/installer/modules/ovirt/manifests/postgres.pp index c46b360..381d67c 100644 ---
2006 Jun 07
0
postgres-pr on windows
After installing One-Click Rails and Postgres 8.1 on Windows, I tried to install the pure-ruby postgres adapter by running gem install postgres-pr It installed fine, and I can do this: G:\InstantRails\rails_apps>irb irb(main):001:0> require "rubygems" => true irb(main):002:0> require "postgres" => true But then if I specify in my config/database.yml to use
2009 Jun 19
0
[PATCH server] make postgres wait for starting to complete before creating databases
--- installer/modules/ovirt/manifests/postgres.pp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/installer/modules/ovirt/manifests/postgres.pp b/installer/modules/ovirt/manifests/postgres.pp index 6620a88..a711e32 100644 --- a/installer/modules/ovirt/manifests/postgres.pp +++ b/installer/modules/ovirt/manifests/postgres.pp @@ -38,10 +38,15 @@ class
2006 Apr 21
4
Bus error in ./script/console with postgres (ext. library)
Is there some special magic that needs to be performed so that the C-based postgres extension library works with the Rails console? I have installed the postgres extension library (replacing the pure Ruby version: postgres-pr) from <http://ruby.scripting.ca/postgres/> Everything works great from WEBrick, but as soon as I fire up the console and try to use it, I get a bus error: