similar to: migration with PostgreSQL - function nextval does not exist

Displaying 20 results from an estimated 800 matches similar to: "migration with PostgreSQL - function nextval does not exist"

2005 Nov 03
9
[Idea] session-wide persistent variables
I was thinking about having instance variable stored and fetched from session container automatically before calling an action and after the action is finished. Using methodology of accessors it would look like: class MyController < ActionController::Base persistent_attr :person def alfa person = ''John Smith'' # render as usual view alfa.rhtml with anchor
2011 Sep 06
1
Workers getting broken after some time
I have strange error that happens after couple of hours. Some instances start to respond on any request with status code 500. Log file unicorn.stderr.log gets populated with this error: app error: undefined method `each'' for nil:NilClass (NoMethodError) /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.2/lib/rack/utils.rb:267:in `initialize''
2011 Sep 18
9
Rails 3 and postgresql
I have a simple project created around a very, very simple database: one main table packs with just three rows Column | Type | Modifiers --------+-----------------------------+---------------------------------------------------- id | integer | not null default nextval(''packs_id_seq''::regclass) nombre | character
2006 Mar 14
3
ActiveRecord row-by-row processing
I want to use ActiveRecord outside of Rails to do processing on large tables. I want to be able to process the rows as they are retrieved rather than having to store the results in an intermediate array. Any suggestions? Looks like I could hack the adapter to provide an accessor to the underlying DBI handle. Anything cleaner than that?
2006 Mar 08
2
"humanizing" model attributes presentation
Given a field in database defined as "discount_rate numeric(3,1)" I found it not very usable for presenting it directly. For example, if there''s a value 5.00 it will render in <%= text_field ''model'', ''discount_rate %> as "0.5E1" which is not very friendly to user. All I do is that I write kind of proxy accessors (prefixing with
2005 Nov 02
1
getting pagination to work on joined tables
As soon as I use Model.find(:all, :include => [...], :limit => 3) I loose associations and can''t do :conditions on joined tables. I''m not able to do pagination in such association. Only solution I came up with is this beast: # I set up a paginator: @reos_pages = Paginator.new self, Reo.count(conds.join('' AND ''),
2010 Apr 14
3
PGError: duplicate key
I''m running a rails 2.3.5 / ruby 1.8.7 / postgresql 8.4.2 app and have just run into a curious problem. I have several tables that are initialized with data from csv files and I''ve noticed that, when I try to add new data to any of these tables via Table.new I get a PGError on duplicate key. For example: MIGRATION: class CreateNumbers < ActiveRecord::Migration def self.up
2009 Sep 07
11
autoincrement for non-id column
There is a table: execute (<<-SQL) CREATE TABLE "tasks" ( "id" serial primary key, "number" serial, "version" integer DEFAULT 0 NOT NULL, "latest_version" boolean DEFAULT ''t'' NOT NULL, "hidden" boolean DEFAULT ''f'' NOT NULL, "type" character varying (1) NOT
2006 Feb 01
4
exclude a column in save!
Hi all, I have a column that peeks its value from a sequence (postgres) some times. Other times, I set it to a certain value. This column has a default value of "nextval(''the_sequence'')"... When I want that this column peeks the value from the sequence, I do this: obj = Mymodel.new obj.some_column1 = blah obj.some_column2 = blah obj.some_column3 = blah obj.save! but
2006 Feb 02
1
circular table refs in activerecord
I cannot find this anywhere, and it is holding up a project. I have a *very* simple rails app with three tables, one of which is the users table: users: Column | Type | Modifiers ---------------+-----------------------------+----------------- id | integer | not null default nextval(''public.users_id_seq''::text) login
2008 May 19
2
x is not a number error??
I may be overlooking something really obvious here but I''m not getting it. I have a Category model. Categories can have sub categories and parent categories, but when a category doesn''t have a parent category, its "parent_categoryid" field is set to null. As far as I know, what I am doing here has been working in the past because there are many categories in my
2006 May 03
4
default values
Hello, I''m working with a postgresql table CREATE TABLE elements ( id serial primary key, c1 text default f1(), ... cN text default fN() ); But if I use de lines @element = Element.new @element.save the values that element take are the nextval in the id field and nules in all the other fields. How can I get the defaults? (but without rewriting the
2006 Mar 21
7
Nuube Sequence problem
In my database the id for a field is 810. RoR thinks that it is 809. My log file (below) shows that just before the insert it grabs the next sequence value. I dont think it should do that. This causes problems further down the line when trying to access the Person object. Development Log file : "SQL (0.016000) select people_seq.nextval id from dual Person Create (0.015000) INSERT
2006 Mar 01
7
Oracle Sequence & Rails
the compiler tell me it: invalid column name: INSERT INTO ago.prova_stats (cognome, nome, id, telefono) VALUES(''Medda'', ''Ivan'', :id, 70565611) where ago.prova_stats is the table used by me and that have only the columns ''cognome'',''nome'' and ''telefono''. My table hasn''t the column
2010 Jul 21
1
asterisk realtime SIP configuration
Hi All, I am trying to configure asterisk realtime. But i am unable to get the extensions listed successfully when i type "sip show peers" in the asterisk CLI . i am unable to see any failure logs when i do a reload i can able to connect to the data source through "odbc show" in the CLI, Any hep in this regard is highly appreciated. Following is the configuration
2009 Jul 27
13
[Bug 22956] New: nv50: kms, random screen blinkage
http://bugs.freedesktop.org/show_bug.cgi?id=22956 Summary: nv50: kms, random screen blinkage Product: xorg Version: git Platform: Other OS/Version: All Status: NEW Severity: normal Priority: medium Component: Driver/nouveau AssignedTo: nouveau at lists.freedesktop.org ReportedBy: kamilkss
2016 Aug 24
2
maildirsize not correct
Thanks, but this is most probably different issue. My maildirsize is computed incorrectly even if I delete it completely and let dovead recompute it so expunging is not in the game. Is there any way how to track/debug the recomputation algorithm in dovecot? On Wed, Aug 24, 2016 at 12:02 AM, WJCarpenter <bill-dovecot at carpenter.org> wrote: > A long shot, but here's how I
2009 Feb 16
17
[Bug 20130] New: GT200: nv50 chipset 0xa0 lockup
http://bugs.freedesktop.org/show_bug.cgi?id=20130 Summary: GT200: nv50 chipset 0xa0 lockup Product: xorg Version: git Platform: x86-64 (AMD64) OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: Driver/nouveau AssignedTo: nouveau at lists.freedesktop.org
2010 Feb 24
4
"Sequence does not exist" for joined model
Hello all, I''m in my 5th month on Ruby on Rails and still learning. I have an application that works fine in sqlite3 and then the boss says he wants it migrated to Oracle. Now, I know very little about Oracle, enough to get into trouble. When I did the migration everything went haywire. Well, I''ve refactored several problems and now I have another. I have two models with a
2007 Nov 17
0
Postgres sequencer and rails
Hi All, I''m wrestle with postgres database and rails. Finally it''s working but i need some explanation : So : I have a sequencer : CREATE SEQUENCE players_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 4 CACHE 1; ALTER TABLE players_id_seq OWNER TO squash; Table : CREATE TABLE players ( id bigserial NOT NULL, firstname character varying,