Displaying 20 results from an estimated 1000 matches similar to: "Resetting sequences in unit tests with pg"
2006 Jun 15
8
postgresql sequence and migrations
I have a specific need to ''fixate'' my ''roles'' table sequence when
migrating.
at migration #4, I have 28 records in my roles tables and I can manually
reset the roles_id_seq but it stands to reason that since I am doing
everything else in the migration, I might as well reset the sequence
there too.
so I tried this in my migration file...
execute
2005 Aug 23
0
Fixtures: pluraly bitten
With my functional tests (on PgSQL) I get strange errors like this
1) Error:
test_create(AufgabeControllerTest):
ActiveRecord::StatementInvalid: ERROR: duplicate key violates unique
constraint "aufgaben_pkey"
Tracking this down, I found that sequences are only reset for some of
the tables I''m using. The reason? Inconsistent singularization.
I won''t go so far as
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
2007 Oct 21
13
[ANN/RFC] Rathole, a fixtures extension plugin
Like lots of other folks, I''ve been searching for a way to scratch my
fixture itches. Rathole is my extraction of a few techniques we''ve
successfully applied at my day job.
We''ve been using Rathole for a month or so now, but I''d really like
some feedback from a wider audience. Rathole tackles:
* Conflicting PK''s (no more id''s in fixture
2005 Aug 06
2
Problem with 0.13.1 ActiveRecordStore with PG 8.0.3.
Hi,
I put the following in my environment.rb file:
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update
(:database_manager => CGI::Session::ActiveRecordStore)
Runnning WEBrick via "script/server" and trying to load any page
served by a controller results in an error like the following:
#<ActiveRecord::StatementInvalid: ERROR: null value in column "id"
2005 Dec 17
10
need some tips for applying patches
I am working with a legacy database that does not always follow the
conventions for table names, primary key and foreign key column names,
and join table names.
This is no problem in my application code because Rails allows me to
override the defaults. However it is making unit testing next to
impossible because fixtures will still try and insert data into the
wrong tables.
Changing the
2006 Jan 10
5
problems overriding module with plugin
Hi I am trying to create a plug-in to fix the error in the rails core
produced by the multiple delete on a HABTM relationship. I have
confirmed that my plug-in is being included into the base during
runtime however the code does not seem to be overridding the base
class.
module ActiveRecord
module Associations
module ClassMethods
def has_and_belongs_to_many(association_id, options =
2006 Feb 01
5
Sybase ctlib Adapter
Hi,
I''ve been trying to update Will Sobel''s sybase-ctlib adapter to pass
unit tests on Rails 1.0. It''s been a slow, sloggy process for me so
far, as I''ve been learning Ruby, Rails, and Sybase administration all
in one go. (c: It''s been a saving grace to have a good starting
point (thanks Will!).
http://dev.rubyonrails.org/ticket/2030
2006 Jul 14
5
migration and inserting default data
Hi,
I''m wondering is there a way to load default data in the migration script?
So, for example I''m creating new table to store the order status, I also
want to pre-populate the table with some data from a sql file.
I have done a quick search on the list but cannot find anything.
thanks,
- reynard
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2007 Feb 14
2
File into database migration
Hi,
I am trying to figure out an approach to load in our initial data into our
database.
I have written some load_data migrations which populate a lot of the stuff,
how some of the database
items are images etc and I am trying to figure out how to approach added
them to the database
during a rake db:migrate
I am thinking if I store the files in a folder off the RAILS_ROOT I should
be able to
2007 Jul 22
18
db:fixtures:load order
I was trying to deal with foreign key issues related to order of
fixture loading when I came across this:
http://techpolesen.blogspot.com/2007/04/rails-fixture-tips.html
This got me looking deeper into rails and I noticed that
db:fixtures:load calls Fixtures.create_fixtures once for each fixture
file. However, Fixtures.create_fixtures is capable of taking multiple
files and also handle the
2007 Jul 13
1
PHP doesn't connect to PG with SELinux
I just migrated my FC4 server to CentOS 5 and had some problems with DB
connections from PHP to a PG server (remote server). The thing is that I
couldn't get an error, until I disabled SELinux. At that time, the PG
connections started working.
Are there any instructions on how to work with SELinux enabled and
multiple applications connecting one with another?
--
select
2006 Feb 14
0
Preserving seconds fraction in PG timestamps when updating?
I have this code:
Link.find(params[:id]).toggle!(''active'')
Before it, its timestamp is:
2005-11-20 20:45:48.741973-07
After:
2005-11-20 20:45:48-07
Why does Rails take it upon itself to truncate the
seconds fraction? How can I get Rails to not change
it?
Thanks,
csn
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best
2012 Jul 25
0
CESA-2012:1116 Moderate CentOS 5 perl-DBD-Pg Update
CentOS Errata and Security Advisory 2012:1116 Moderate
Upstream details at : https://rhn.redhat.com/errata/RHSA-2012-1116.html
The following updated files have been uploaded and are currently
syncing to the mirrors: ( sha256sum Filename )
i386:
73189dc0ecf0859b3fce869a56ccb672fb4727d699501a768aabff3de76e007f perl-DBD-Pg-1.49-4.el5_8.i386.rpm
x86_64:
2012 Jul 25
0
CESA-2012:1116 Moderate CentOS 6 perl-DBD-Pg Update
CentOS Errata and Security Advisory 2012:1116 Moderate
Upstream details at : https://rhn.redhat.com/errata/RHSA-2012-1116.html
The following updated files have been uploaded and are currently
syncing to the mirrors: ( sha256sum Filename )
i386:
a50f3bbb9a28e17b78ac2672b59ac293e6f06816b8b368e185cfb77e0a9ef9c7 perl-DBD-Pg-2.15.1-4.el6_3.i686.rpm
x86_64:
2010 Apr 07
0
Need help with ActiveWarehouse-ETL-0.9.1 PG connection problem
I am trying to load conversion data into a postgresql database using
activewarehouse-etl. I can create a flat file output from the
conversion data without problem. However, when I try to load into the
table using the information contained in config/database.yml I see
this error:
/usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/
base.rb:1959:in `method_missing'':
2008 Feb 06
1
Try-Catch AWDWR P3.0, Sect9.2,Mid pg 121.
On page 118, file store_controller.rb, the "redirect_to_index" is added.
At mid page 120, that line is removed. When the browser is first sent to
the ":3000/store", the page displays properly. But when the Add to Cart
button is clicked, the browser displays the text of a try-catch block
(see below). There is no error message - the browser clearly sees text
to be displayed. If I
2006 Oct 31
0
6197520 svccfg import prints misleading message if supplied manifest with empty pg type
Author: sdussud
Repository: /hg/zfs-crypto/gate
Revision: f61d652f8555ce9713866ebafccf8dc96979b524
Log message:
6197520 svccfg import prints misleading message if supplied manifest with empty pg type
Files:
update: usr/src/cmd/svc/svccfg/svccfg_libscf.c
2013 Sep 13
0
[LLVMdev] Fwd: Profile (-pg) segfault
Folks,
I'm trying to profile a code compiled with Clang and I'm getting a segfault
on mcount independently of the program I run:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b1245b in mcount () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff7b1245b in mcount () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff7dd6588 in ?? () from
2009 May 19
0
CESA-2009:0479 Moderate CentOS 5 i386 perl-DBD-Pg Update
CentOS Errata and Security Advisory 2009:0479 Moderate
Upstream details at : https://rhn.redhat.com/errata/RHSA-2009-0479.html
The following updated files have been uploaded and are currently
syncing to the mirrors: ( md5sum Filename )
i386:
b34fdb3cbe4002e6b1aef3ffb27cb92d perl-DBD-Pg-1.49-2.el5_3.1.i386.rpm
Source:
53a7eb4309c1c6e69e64835a41a61339 perl-DBD-Pg-1.49-2.el5_3.1.src.rpm
--